[TIMOB-23710] Android: dexer fails due to duplicate Crittercism classes
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-08-16T07:43:35.000+0000 |
Affected Version/s | Release 6.0.0 |
Fix Version/s | Release 6.0.0 |
Components | Android, CLI |
Labels | Android |
Reporter | Christopher Williams |
Assignee | Christopher Williams |
Created | 2016-08-01T13:46:07.000+0000 |
Updated | 2017-06-15T19:09:05.000+0000 |
Description
Looks like somehow the crittercism JARs are getting added to the dexer listing multiple times? or maybe our replacement module uses the same class names?
[INFO] : Generating i18n files
[INFO] : Generating /Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/build/android/res/values/theme.xml
[INFO] : Packaging application: /opt/android-sdk/build-tools/23.0.3/aapt "package" "-f" "-m" "-J" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/build/android/gen" "-M" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/build/android/AndroidManifest.xml" "-A" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/build/android/bin/assets" "-S" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/build/android/res" "-I" "/opt/android-sdk/platforms/android-23/android.jar" "-F" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/build/android/bin/app.ap_" "--auto-add-overlay" "--extra-packages" "ti.modules.titanium.ui:android.support.v7.appcompat:android.support.v7.cardview" "-S" "/var/folders/cd/hf3x_2sd70jd3vsbr9w1xf8c0000gq/T/11671-13844-10eh7ef/res" "-S" "/var/folders/cd/hf3x_2sd70jd3vsbr9w1xf8c0000gq/T/11671-13844-7qurew/res" "-S" "/var/folders/cd/hf3x_2sd70jd3vsbr9w1xf8c0000gq/T/11671-13844-8i2i1u/res"
[INFO] : Building Java source files: /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/bin/javac "-J-Xmx1024M" "-encoding" "utf8" "-bootclasspath" "/opt/android-sdk/platforms/android-23/android.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/kroll-v8.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-analytics.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/aps-analytics.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-android.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/jaxen-1.1.1.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/ti-commons-codec-1.3.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/kroll-common.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/titanium.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/android-support-multidex.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-filesystem.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-app.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-ui.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/nineoldandroids-appc-2.4.0.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-media.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-appcompat.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/android-support-v4.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/android-support-v7-appcompat.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-cardview.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/cardview-v7-23.0.1.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-locale.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-network.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-xml.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-utils.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-geolocation.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-accelerometer.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-contacts.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-map.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-gesture.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-calendar.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-platform.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-database.jar:/Users/cwilliams/Library/Application Support/Titanium/modules/android/com.appcelerator.apm/1.1.5/crittercism.jar:/Users/cwilliams/Library/Application Support/Titanium/modules/android/com.appcelerator.apm/1.1.5/lib/crittercism_v5_3_3_sdkonly.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/kroll-apt.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/lib/titanium-verify.jar:/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/lib/titanium-debug.jar:R.class:AssetCryptImpl.class:DebugTestActivity.class:DebugTestAppInfo.class:DebugTestApplication.class" "-d" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/build/android/bin/classes" "-proc:none" "-target" "1.6" "-source" "1.6" "@/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/build/android/java-sources.txt"
[INFO] : Running dexer: /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/bin/java "-Xmx1024M" "-XX:-UseGCOverheadLimit" "-Djava.ext.dirs=/opt/android-sdk/platform-tools" "-jar" "/opt/android-sdk/build-tools/23.0.3/lib/dx.jar" "--dex" "--multi-dex" "--output=/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/build/android/bin/dexfiles" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/build/android/bin/classes" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/lib/titanium-verify.jar" "/Users/cwilliams/Library/Application Support/Titanium/modules/android/com.appcelerator.apm/1.1.5/crittercism.jar" "/Users/cwilliams/Library/Application Support/Titanium/modules/android/com.appcelerator.apm/1.1.5/lib/crittercism_v5_3_3_sdkonly.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/kroll-v8.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-analytics.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/aps-analytics.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-android.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/jaxen-1.1.1.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/ti-commons-codec-1.3.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/kroll-common.jar" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/plugins/com.soasta.touchtest.android/soasta/sdk/titanium.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/android-support-multidex.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-filesystem.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-app.jar" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/plugins/com.soasta.touchtest.android/soasta/sdk/titanium-ui.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/nineoldandroids-appc-2.4.0.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-media.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-appcompat.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/android-support-v4.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/android-support-v7-appcompat.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-cardview.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/cardview-v7-23.0.1.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-locale.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-network.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-xml.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-utils.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-geolocation.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-accelerometer.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-contacts.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-map.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-gesture.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-calendar.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-platform.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/modules/titanium-database.jar" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/plugins/com.soasta.touchtest.android/lib/aspectjrt.jar" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/plugins/com.soasta.touchtest.android/lib/TouchTestDriver.jar" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/plugins/com.soasta.touchtest.android/lib/TouchTestDriver-APIv11.jar" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/plugins/com.soasta.touchtest.android/lib/TouchTestDriver-APIv12.jar" "/Users/cwilliams/Documents/Appcelerator_Studio_Workspace/debug-test/plugins/com.soasta.touchtest.android/lib/TouchTestDriver-Titanium.jar" "/Users/cwilliams/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/lib/titanium-debug.jar"
[ERROR] : Failed to run dexer:
[ERROR] :
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/crittercism/app/CritterCallback;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/crittercism/app/CritterRateMyAppButtons;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/crittercism/app/CritterUserData;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/crittercism/app/CritterUserDataRequest;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/crittercism/app/CritterUserDataRequest$1;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/crittercism/app/Crittercism;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/crittercism/app/CrittercismConfig;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/crittercism/app/CrittercismNDK;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/crittercism/app/Transaction;
[ERROR] :
[ERROR] : UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] : java.lang.RuntimeException: Translation has been interrupted
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:608)
[ERROR] : at com.android.dx.command.dexer.Main.runMultiDex(Main.java:366)
[ERROR] : at com.android.dx.command.dexer.Main.run(Main.java:275)
[ERROR] : at com.android.dx.command.dexer.Main.main(Main.java:245)
[ERROR] : at com.android.dx.command.Main.main(Main.java:106)
[ERROR] : Caused by: java.lang.InterruptedException: Too many errors
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:600)
[ERROR] : ... 4 more
Same root cause as TIMOB-23697. I added a fix to hyperloop plugin itself to avoid duplicates there, but we may want to just move that uniqueness check up into the core Android CLI dexer hook.
The culprits for me are: - /Users/cwilliams/Library/Application Support/Titanium/modules/android/com.appcelerator.apm/1.1.5/lib/crittercism_v5_3_3_sdkonly.jar - /Users/cwilliams/Library/Application\ Support/Titanium/mobilesdk/osx/6.0.0.v20160801022916/android/aps-analytics.jar The first is not surprising to me. The second is. When I turn that JAR into a Zip and unzip it, I find the culprits under com/crittercism/app/*.class
I think this is the offending commit that added a bad JAR file: https://github.com/appcelerator/titanium_mobile/commit/0703abbd0ad7b62aa2113ab917947e31485daa19 The size exploded from ~33Kb to 908Kb in that commit.
Issue was fixed by [~cwilliams] with this PR https://github.com/appcelerator/titanium_mobile/pull/8203 due to a bad jar file being included. PR merged.
Closing ticket as fixed, with reference to the above.