Unable to convert classes into dex format in unity - android
I was using the older firebase version and gvr 1.30.. now when i updated the firebase version to 4.0.3 i am getting the Unable to convert classes into dex format at the end of build.
commandInvokationFailure: Unable to convert classes into dex format.
C:/Program Files/Java/jdk1.8.0_60\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="E:/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
logcat :-
stderr[
Uncaught translation error: java.lang.IllegalArgumentException: already
added: Lcom/google/protobuf/GeneratedExtensionRegistryLoader;
Uncaught translation error: java.lang.IllegalArgumentException: already
added:
Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat;
Uncaught translation error: java.lang.IllegalArgumentException: already added:Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoIcsImpl;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoStubImpl;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/animation/AnimatorCompatHelper;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActionBarDrawerToggle;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActionBarDrawerToggle$ActionBarDrawerToggleImpl;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActionBarDrawerToggle$ActionBarDrawerToggleImplBase;
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:613)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at SDKMain.main(SDKMain.java:129)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:605)
... 9 more
]
stdout[
processing archive
E:\Backup\WorkShop\VRQuiz\Source\Unity\Temp\StagingArea\android-
libraries\firebase-analytics-11.0.4\libs\.\classes.jar...
ignored resource META-INF/
ignored resource META-INF/MANIFEST.MF
ignored resource com/
ignored resource com/google/
ignored resource com/google/android/
ignored resource com/google/android/gms/
ignored resource com/google/android/gms/measurement/
processing
com/google/android/gms/measurement/AppMeasurementContentProvider.class...
processing com/google/android/gms/measurement/AppMeasurementInstallReferrerReceiver.class...
processing com/google/android/gms/measurement/AppMeasurementJobService.class...
processing com/google/android/gms/measurement/AppMeasurementReceiver.class...
processing com/google/android/gms/measurement/AppMeasurementService.class...
processing archive
E:\Backup\WorkShop\VRQuiz\Source\Unity\Temp\StagingArea\android-
libraries\firebase-analytics-impl-11.0.4\libs\.\classes.jar...
ignored resource META-INF/
ignored resource META-INF/MANIFEST.MF
ignored resource com/
ignored resource com/google/
ignored resource com/google/android/
ignored resource com/google/android/gms/
ignored resource com/google/android/gms/internal/
processing com/google/android/gms/internal/zzcec.class...
processing com/google/android/gms/measurement/AppMeasurement$zzb.class...
ignored resource com/google/firebase/
ignored resource com/google/firebase/analytics/
processing com/google/firebase/analytics/FirebaseAnalytics.class...
processing com/google/firebase/analytics/FirebaseAnalytics$Event.class...
processing com/google/firebase/analytics/FirebaseAnalytics$Param.class...
processing
com/google/firebase/analytics/FirebaseAnalytics$UserProperty.class...
ignored resource
E:\Backup\WorkShop\VRQuiz\Source\Unity\Temp\StagingArea\android-
libraries\firebase-app-unity-4.0.3\libs\.\armeabi-v7a\libApp.so
processing archive
E:\Backup\WorkShop\VRQuiz\Source\Unity\Temp\StagingArea\android-
libraries\firebase-app-unity-4.0.3\libs\.\classes.jar...
ignored resource
E:\Backup\WorkShop\VRQuiz\Source\Unity\Temp\StagingArea\android-
libraries\firebase-app-unity-4.0.3\libs\.\x86\libApp.so
processing archive
E:\Backup\WorkShop\VRQuiz\Source\Unity\Temp\StagingArea\android-
libraries\firebase-auth-11.0.4\libs\.\classes.jar...
ignored resource META-INF/
ignored resource META-INF/MANIFEST.MF
ignored resource com/
ignored resource com/google/
ignored resource com/google/android/
ignored resource com/google/android/gms/
ignored resource com/google/android/gms/internal/
processing com/google/android/gms/internal/jn.class...
processing com/google/android/gms/internal/jo.class...
processing com/google/android/gms/int<message truncated>
It is caused due to the duplicate jar or aar files. Search all the jar's using the "grep -r "string" "path" command in terminal by using "GeneratedExtensionRegistryLoader" etc and delete the duplicates by keeping only one in the unity plugins folder. This should resolve the issue.
When I deleted "gvr_android_common.aar" file, the project is building, but now app crashes.
Related
Cannot build app on android. Multiple Linking errors
when building my app on android studio, I'm getting the following error: > Task :app:processDebugResources FAILED AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/a72fc6914174c60e99bb51c1d98759b9/material-1.1.0/res/values/values.xml","position":{"startLine":527,"startColumn":4,"startOffset":39038,"endLine":592,"endColumn":10,"endOffset":43834}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/a72fc6914174c60e99bb51c1d98759b9/material-1.1.0/res/values/values.xml:528:5-593:11: AAPT: error: style attribute 'android:attr/contextPopupMenuStyle' not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/a72fc6914174c60e99bb51c1d98759b9/material-1.1.0/res/values/values.xml","position":{"startLine":641,"startColumn":4,"startOffset":46880,"endLine":698,"endColumn":10,"endOffset":51129}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/a72fc6914174c60e99bb51c1d98759b9/material-1.1.0/res/values/values.xml:642:5-699:11: AAPT: error: style attribute 'android:attr/contextPopupMenuStyle' not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/a72fc6914174c60e99bb51c1d98759b9/material-1.1.0/res/values/values.xml","position":{"startLine":747,"startColumn":4,"startOffset":54189,"endLine":811,"endColumn":10,"endOffset":58892}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/a72fc6914174c60e99bb51c1d98759b9/material-1.1.0/res/values/values.xml:748:5-812:11: AAPT: error: style attribute 'android:attr/contextPopupMenuStyle' not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/a72fc6914174c60e99bb51c1d98759b9/material-1.1.0/res/values/values.xml","position":{"startLine":908,"startColumn":4,"startOffset":64921,"endLine":965,"endColumn":10,"endOffset":69086}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/a72fc6914174c60e99bb51c1d98759b9/material-1.1.0/res/values/values.xml:909:5-966:11: AAPT: error: style attribute 'android:attr/contextPopupMenuStyle' not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/a72fc6914174c60e99bb51c1d98759b9/material-1.1.0/res/values/values.xml","position":{"startLine":1022,"startColumn":4,"startOffset":72626,"endLine":1033,"endColumn":10,"endOffset":73681}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/a72fc6914174c60e99bb51c1d98759b9/material-1.1.0/res/values/values.xml:1023:5-1034:11: AAPT: error: style attribute 'android:attr/dialogCornerRadius' not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v26/values-v26.xml","position":{"startLine":4,"startColumn":4,"startOffset":217,"endLine":7,"endColumn":12,"endOffset":426}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v26/values-v26.xml:5:5-8:13: AAPT: error: resource android:attr/colorError not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v26/values-v26.xml","position":{"startLine":8,"startColumn":4,"startOffset":431,"endLine":11,"endColumn":12,"endOffset":652}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v26/values-v26.xml","position":{"startLine":12,"startColumn":4,"startOffset":657,"endLine":15,"endColumn":12,"endOffset":891}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v28/values-v28.xml","position":{"startLine":4,"startColumn":4,"startOffset":217,"endLine":7,"endColumn":12,"endOffset":442}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v28/values-v28.xml:5:5-8:13: AAPT: error: resource android:attr/dialogCornerRadius not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v28/values-v28.xml","position":{"startLine":8,"startColumn":4,"startOffset":447,"endLine":11,"endColumn":12,"endOffset":684}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v28/values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v23/values-v23.xml","position":{"startLine":37,"startColumn":4,"startOffset":2618,"endLine":40,"endColumn":12,"endOffset":2837}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v23/values-v23.xml:38:5-41:13: AAPT: error: style attribute 'android:attr/hyphenationFrequency' not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v23/values-v23.xml","position":{"startLine":37,"startColumn":4,"startOffset":2618,"endLine":40,"endColumn":12,"endOffset":2837}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v23/values-v23.xml:38:5-41:13: AAPT: error: style attribute 'android:attr/breakStrategy' not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v23/values-v23.xml","position":{"startLine":44,"startColumn":4,"startOffset":3177,"endLine":47,"endColumn":12,"endOffset":3402}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v23/values-v23.xml:45:5-48:13: AAPT: error: style attribute 'android:attr/hyphenationFrequency' not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v23/values-v23.xml","position":{"startLine":44,"startColumn":4,"startOffset":3177,"endLine":47,"endColumn":12,"endOffset":3402}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/102f4e5339e61a836806a4922c0ccf33/appcompat-1.1.0/res/values-v23/values-v23.xml:45:5-48:13: AAPT: error: style attribute 'android:attr/breakStrategy' not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/cb98cb7aa050aadd68368dde2f298c4f/cardview-1.0.0/res/values-v23/values-v23.xml","position":{"startLine":2,"startColumn":4,"startOffset":55,"endLine":4,"endColumn":12,"endOffset":200}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/cb98cb7aa050aadd68368dde2f298c4f/cardview-1.0.0/res/values-v23/values-v23.xml:3:5-5:13: AAPT: error: resource android:attr/colorBackgroundFloating not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/a72fc6914174c60e99bb51c1d98759b9/material-1.1.0/res/values/values.xml","position":{"startLine":1708,"startColumn":4,"startOffset":117184,"endLine":1715,"endColumn":10,"endOffset":117611}}],"original":"/Users/prikshetsharma/.gradle/caches/transforms-2/files-2.1/a72fc6914174c60e99bb51c1d98759b9/material-1.1.0/res/values/values.xml:1709:5-1716:11: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.\n ","tool":"AAPT"} I also tried https://github.com/facebook/react-native/issues/30815, but still getting the same error. How to fix this?
Have a try by cleaning the project Gradle. Run Below Command: cd android rm -rf android/.gradle rm -rf .gradle rm -rf ~/.gradle ./gradlew clean
Goto Android folder and Run ./gradlew clean Remove caches folder from /Users/prikshetsharma/.gradle/caches/ And Go to android/gradle/wrapper/gradle-wrappers.properties and replace distrubution url to 6.3 instead of 6.2 like this, distributionUrl=https://services.gradle.org/distributions/gradle-6.3-all.zip NOTE: check targetSdkVersion in build.gradle, it should be greater than 26.
Error is because you are inheriting the wrong theme in styles.xml. Make sure you are using the correct App Theme. I Can't show you the exact code seeing your post but that's the problem I can see.
Android-Native library (com/sun/jna/android-x86/libjnidispatch.so) not found in resource path (.)
I am developing my android App with MongoDB Stitch, which has a pre-requisite that I need to install MongoDB Mobile Tarball.Installation Structure After installation I run the program, getting this exception: 08-09 13:01:34.308 20251-20278/? E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 Process: io.datats.datatungshing.app, PID: 20251 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:354) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383) at java.util.concurrent.FutureTask.setException(FutureTask.java:252) at java.util.concurrent.FutureTask.run(FutureTask.java:271) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764) Caused by: com.mongodb.embedded.client.MongoClientEmbeddedException: Failed to load the mongodb library: 'mongo_embedded_capi'. Native library (com/sun/jna/android-x86/libjnidispatch.so) not found in resource path (.) Please set the library location by either: - Adding it to the classpath. - Setting 'jna.library.path' system property - Configuring it in the 'MongoEmbeddedSettings.builder().libraryPath' method. at com.mongodb.embedded.client.MongoDBCAPIHelper.init(MongoDBCAPIHelper.java:60) at com.mongodb.embedded.client.MongoClients.init(MongoClients.java:38) at com.mongodb.stitch.core.services.mongodb.local.internal.CoreLocalMongoDbService.getClient(CoreLocalMongoDbService.java:36) at com.mongodb.stitch.android.services.mongodb.local.LocalMongoDbService.access$000(LocalMongoDbService.java:35) at com.mongodb.stitch.android.services.mongodb.local.LocalMongoDbService$1.getClient(LocalMongoDbService.java:50) at com.mongodb.stitch.android.services.mongodb.local.LocalMongoDbService$1.getClient(LocalMongoDbService.java:41) at com.mongodb.stitch.android.core.internal.StitchAppClientImpl.getServiceClient(StitchAppClientImpl.java:105) at io.datats.datatungshing.forboledts.SecondActivity$getTrendFromDB.doInBackground(SecondActivity.java:57) at io.datats.datatungshing.forboledts.SecondActivity$getTrendFromDB.doInBackground(SecondActivity.java:37) at android.os.AsyncTask$2.call(AsyncTask.java:333) at java.util.concurrent.FutureTask.run(FutureTask.java:266) ... 4 more Caused by: java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/android-x86/libjnidispatch.so) not found in resource path (.) at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:962) at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922) at com.sun.jna.Native.<clinit>(Native.java:190) at com.sun.jna.Native.loadLibrary(Native.java:544) at com.mongodb.embedded.client.MongoDBCAPIHelper.init(MongoDBCAPIHelper.java:58) ... 14 more The highlighted code is in my AsyncTask, which is just creating a MongoClient in my java program: final StitchAppClient client = Stitch.initializeDefaultAppClient("APP-ID"); final MongoClient mobileClient = client.getServiceClient(LocalMongoDbService.clientFactory); MongoCollection<Document> localCollection = mobileClient.getDatabase(databaseName).getCollection("CollectionName"); /*Document doc = localCollection.find().first(); this.keywordList = (List<String>) doc.get("list");*/ return true; I have also created and included a jniLibs directory in my src/main/, which contains the following components: jniLibs In my jniLibs I also have the file libjnidispatch.io included. Please help me on this strange bug. The emulator I used is Nexus 6 API 28. Thank you!!!
Many errors appeared after i added a recycler-view dependency in my project
My app worked fine and compilated untill i added com.android.support:recyclerview-v7:28.0.0-alpha1 in my project. Here are my errors: Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar] C:\Users\Smith\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.3.1.aar\455a076f8084ee34b277fdfdb97836e0\res\values\values.xml Error:(203, 5) error: resource android:attr/fontStyle not found. Error:(203, 5) error: resource android:attr/font not found. Error:(203, 5) error: resource android:attr/fontWeight not found. Error:(203, 5) error: resource android:attr/fontVariationSettings not found. Error:(203, 5) error: resource android:attr/ttcIndex not found. C:\Users\Smith\AndroidStudioProjects\DontSleepManager\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml Error:(314) resource android:attr/fontStyle not found. Error:(314) resource android:attr/font not found. Error:(314) resource android:attr/fontWeight not found. Error:(314) resource android:attr/fontVariationSettings not found. Error:(314) resource android:attr/ttcIndex not found. Error:failed linking references. Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:Execution failed for task ':app:processDebugResources'. > Failed to execute aapt Information:BUILD FAILED in 29s Information:15 errors Information:0 warnings Information:See complete output in console If i add the line android.enableAapt2=false in gradle-properties then i get next warnings: Please help me to figure out that
Try to change com.android.support:recyclerview-v7:28.0.0-alpha1 to com.android.support:recyclerview-v7:25.3.1. And take a look at this question
Duplicate class MultiDex$V14.class
My Android gradle build is failing during the ProGuard phase with a duplicate class error for MultiDex$V14.class (see below). I understand what a duplicate class is and I know what MultiDex is but I still don't understand how it's a duplicate. Questions: I see one definition is in multidex.jar, of course. How can I tell where the other is defined? Isn't ProGuard supposed to remove duplicate entries instead of complaining about them? The "What went wrong" description at the bottom seems unrelated to the duplicate class. Is it? - (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass) Warning: can't write resource [.gitkeep] (Duplicate zip entry [DMMPlaybackBitrateSwitching-1.0.jar:.gitkeep]) ... Warning: can't write resource [.gitkeep] (Duplicate zip entry [DMMDigitalMusicLocatorServiceClient-1.0.jar:.gitkeep]) Exception while processing task java.io.IOException: Can't write [/Users/fruitman/dev/MusicAndroid-one/build/DigitalMusicAndroidAppOne/DigitalMusicAndroidAppOne-11.0/RHEL5_64/DEV.STD.PTHREAD/build/private/android-gradle/intermediates/classes-proguard/fourfireOS/debug/classes.jar] (Can't read [/Users/fruitman/dev/MusicAndroid-one/build/DigitalMusicAndroidAppOne/DigitalMusicAndroidAppOne-11.0/RHEL5_64/DEV.STD.PTHREAD/build/private/tmp/artifacts/multidex.jar(;;;;;;!META-INF/MANIFEST.MF)] (Duplicate zip entry [multidex.jar:android/support/multidex/MultiDex$V14.class])) at proguard.OutputWriter.writeOutput(OutputWriter.java:187) at proguard.OutputWriter.execute(OutputWriter.java:79) at proguard.ProGuard.writeOutput(ProGuard.java:427) at proguard.ProGuard.execute(ProGuard.java:175) at proguard.gradle.ProGuardTask.proguard(ProGuardTask.java:1074) at com.android.build.gradle.tasks.AndroidProGuardTask.doMinification(AndroidProGuardTask.java:139) at com.android.build.gradle.tasks.AndroidProGuardTask$1.run(AndroidProGuardTask.java:115) at com.android.builder.tasks.Job.runTask(Job.java:48) at com.android.build.gradle.tasks.SimpleWorkQueue$EmptyThreadContext.runTask(SimpleWorkQueue.java:41) at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:227) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: Cannot read [/Users/fruitman/dev/MusicAndroid-one/build/DigitalMusicAndroidAppOne/DigitalMusicAndroidAppOne-11.0/RHEL5_64/DEV.STD.PTHREAD/build/private/tmp/artifacts/multidex.jar(;;;;;;!META-INF/MANIFEST.MF)] (Duplicate zip entry [multidex.jar:android/support/multidex/MultiDex$V14.class]) at proguard.InputReader.readInput(InputReader.java:188) at proguard.InputReader.readInput(InputReader.java:158) at proguard.OutputWriter.writeOutput(OutputWriter.java:176) ... 10 more Caused by: java.io.IOException: Duplicate zip entry [multidex.jar:android/support/multidex/MultiDex$V14.class] at proguard.io.JarWriter.getOutputStream(JarWriter.java:138) at proguard.io.FilteredDataEntryWriter.getOutputStream(FilteredDataEntryWriter.java:105) at proguard.io.FilteredDataEntryWriter.getOutputStream(FilteredDataEntryWriter.java:105) at proguard.io.FilteredDataEntryWriter.getOutputStream(FilteredDataEntryWriter.java:92) at proguard.io.ClassRewriter.read(ClassRewriter.java:68) at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87) at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87) at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87) at proguard.io.JarReader.read(JarReader.java:65) at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:65) at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:53) at proguard.InputReader.readInput(InputReader.java:184) ... 12 more :DigitalMusicAndroidAppOne:shrinkFourFireOSDebugMultiDexComponents FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':DigitalMusicAndroidAppOne:shrinkFourFireOSDebugMultiDexComponents'. > java.io.IOException: Can't read [/Users/fruitman/dev/MusicAndroid-one/build/DigitalMusicAndroidAppOne/DigitalMusicAndroidAppOne-11.0/RHEL5_64/DEV.STD.PTHREAD/build/private/android-gradle/intermediates/classes-proguard/fourfireOS/debug/classes.jar] (Can't process class [com/company/communication/ir/ParcelableIRServiceEndpoint.class] (Unexpected end of ZLIB input stream)) * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 47.07 secs BUILD FAILED
after two days ,i find the question ,in the lib..multidex 1.0.1,,but dependencies is 1.0.0,so just kill the lib,it's work now
Error Gradle when generate apk in Android Studio: Exception parsing classes
I have a problem when I generate signed Apk file in Android studio. I get a messages below: Error:Error converting bytecode to dex: Cause: java.lang.RuntimeException: Exception parsing classes Error:1 error; aborting :app:transformClassesWithDexForRelease FAILED Error:Execution failed for task ':app:transformClassesWithDexForRelease'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_67\bin\java.exe'' finished with non-zero exit value 1 I use proguard in build gradle: classpath 'com.android.tools.build:gradle:2.1.0' I was searching through many existing answers, but it's not worked. I refer this topic, but i can not find anything like this. When try to use gradlew assembleRelease, I find the message: Cause: java.lang.RuntimeException: Exception parsing classes UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.RuntimeException: Exception parsing classes at com.android.dx.command.dexer.Main.processClass(Main.java:761) at com.android.dx.command.dexer.Main.processFileBytes(Main.java:727) at com.android.dx.command.dexer.Main.access$1200(Main.java:87) at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1655) at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284) at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166) at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144) at com.android.dx.command.dexer.Main.processOne(Main.java:681) at com.android.dx.command.dexer.Main.processAllFiles(Main.java:578) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:315) at com.android.dx.command.dexer.Main.run(Main.java:286) at com.android.builder.internal.compiler.DexWrapper.run(DexWrapper.java:52) at com.android.builder.core.AndroidBuilder$2.call(AndroidBuilder.java:1511) at com.android.builder.core.AndroidBuilder$2.call(AndroidBuilder.java:1507) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: com.android.dx.cf.iface.ParseException: name already added: string{"a"} at com.android.dx.cf.direct.AttributeListParser.parse(AttributeListParser.java:156) at com.android.dx.cf.direct.AttributeListParser.parseIfNecessary(AttributeListParser.java:115) at com.android.dx.cf.direct.AttributeListParser.getEndOffset(AttributeListParser.java:96) at com.android.dx.cf.direct.MemberListParser.parse(MemberListParser.java:213) at com.android.dx.cf.direct.MemberListParser.parseIfNecessary(MemberListParser.java:108) at com.android.dx.cf.direct.FieldListParser.getList(FieldListParser.java:54) at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:536) at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406) at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388) at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251) at com.android.dx.command.dexer.Main.parseClass(Main.java:773) at com.android.dx.command.dexer.Main.access$1600(Main.java:87) at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1694) at com.android.dx.command.dexer.Main.processClass(Main.java:758) ... 17 more Caused by: java.lang.IllegalArgumentException: name already added: string{"a"} at com.android.dx.rop.annotation.Annotation.add(Annotation.java:208) at com.android.dx.cf.direct.AnnotationParser.parseAnnotation(AnnotationParser.java:264) at com.android.dx.cf.direct.AnnotationParser.parseAnnotations(AnnotationParser.java:223) at com.android.dx.cf.direct.AnnotationParser.parseAnnotationAttribute(AnnotationParser.java:152) at com.android.dx.cf.direct.StdAttributeFactory.runtimeVisibleAnnotations(StdAttributeFactory.java:632) at com.android.dx.cf.direct.AnnotationParser.parseAnnotations(AnnotationPa at com.android.dx.cf.direct.AnnotationParser.parseAnnotationAttribute(Anno at com.android.dx.cf.direct.StdAttributeFactory.runtimeVisibleAnnotations( at com.android.dx.cf.direct.StdAttributeFactory.parse0(StdAttributeFactory at com.android.dx.cf.direct.AttributeFactory.parse(AttributeFactory.java:9 at com.android.dx.cf.direct.AttributeListParser.parse(AttributeListParser. ... 30 more 1 error; aborting :app:transformClassesWithDexForRelease FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:transformClassesWithDexForRelease'. > com.android.build.api.transform.TransformException: com.android.ide.common.proce s.ProcessException: Return code 1 for dex process * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug op BUILD FAILED I tried create new project and copy all gradle, proguard-pro and it build ok. I don't know why? What can be other possible solution please ?