/libs/sinch-android-verification-1.1.2.jar(;;;;;;!META-INF/**,!rootdoc.txt)] (Duplicate zip entry [sinch-android-verification-1.1.2.jar:com/sinch/verification/Config.class])
build.sbt
unmanagedJars in Compile += file("libs/sinch-android-verification-1.1.2.jar")
Caused by: java.io.IOException: Duplicate zip entry [sinch-android-verification-1.1.2.jar:com/sinch/verification/Config.class]
[error] (android:proguard) java.io.IOException: Can't write [/Users/******/target/android/intermediates/proguard/classes.proguard.jar] (Can't read [/Users/******/libs/sinch-android-verification-1.1.2.jar(;;;;;;!META-INF/**,!rootdoc.txt)] (Duplicate zip entry [sinch-android-verification-1.1.2.jar:com/sinch/verification/Config.class]))
The line specifying:
unmanagedJars in Compile
is superfluous and the cause of this error.
Related
I cloned this project and and copied the .so files to my project's jniLibs folder.
After that, it looked like this:
However, when I tried using the library it throws:
09-18 10:22:53.861 18439-19193/com.mopo.audiofingerprinter W/linker: libACRCloudExtrTool.so: unused DT entry: type 0x6ffffffe arg 0x4718
09-18 10:22:53.861 18439-19193/com.mopo.audiofingerprinter W/linker: libACRCloudExtrTool.so: unused DT entry: type 0x6fffffff arg 0x2
09-18 10:22:53.871 18439-19193/com.mopo.audiofingerprinter E/art: No implementation found for void com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.native_init() (tried Java_com_mopo_audiofingerprinter_tageditor_ACRCloudExtrTool_native_1init and Java_com_mopo_audiofingerprinter_tageditor_ACRCloudExtrTool_native_1init__)
09-18 10:22:53.881 18439-19193/com.mopo.audiofingerprinter E/UncaughtException: java.lang.UnsatisfiedLinkError: No implementation found for void com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.native_init() (tried Java_com_mopo_audiofingerprinter_tageditor_ACRCloudExtrTool_native_1init and Java_com_mopo_audiofingerprinter_tageditor_ACRCloudExtrTool_native_1init__)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.native_init(Native Method)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.<clinit>(ACRCloudExtrTool.java:57)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.createFingerprintByFile(ACRCloudExtrTool.java:0)
at com.mopo.audiofingerprinter.tageditor.ACRCloudRecognizer.recognizeByFile(ACRCloudRecognizer.java:129)
at com.mopo.audiofingerprinter.tageditor.TestActivity$RecThread.run(TestActivity.java:84)
09-18 10:22:54.132 18439-19193/com.mopo.audiofingerprinter E/AndroidRuntime: FATAL EXCEPTION: Thread-51298
Process: com.mopo.audiofingerprinter, PID: 18439
java.lang.UnsatisfiedLinkError: No implementation found for void com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.native_init() (tried Java_com_mopo_audiofingerprinter_tageditor_ACRCloudExtrTool_native_1init and Java_com_mopo_audiofingerprinter_tageditor_ACRCloudExtrTool_native_1init__)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.native_init(Native Method)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.<clinit>(ACRCloudExtrTool.java:57)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.createFingerprintByFile(ACRCloudExtrTool.java:0)
at com.mopo.audiofingerprinter.tageditor.ACRCloudRecognizer.recognizeByFile(ACRCloudRecognizer.java:129)
at com.mopo.audiofingerprinter.tageditor.TestActivity$RecThread.run(TestActivity.java:84)
The weird thing, is that the compiled project I cloned is working without errors. I have even attempted copying the classes from the demo and still it didn't work.
EDIT
After implementing Divy Soni's answer, the jniLibs folder disappeared entirely. And when I built the app it crashed with:
`09-18 11:21:46.848 26158-26798/com.mopo.audiofingerprinter E/UncaughtException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.mopo.audiofingerprinter-1/base.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.mopo.audiofingerprinter-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.mopo.audiofingerprinter-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libACRCloudExtrTool.so"
at java.lang.Runtime.loadLibrary(Runtime.java:367)
at java.lang.System.loadLibrary(System.java:988)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.<clinit>(ACRCloudExtrTool.java:56)
at com.mopo.audiofingerprinter.tageditor.ACRCloudExtrTool.createFingerprintByFile(ACRCloudExtrTool.java:0)
at com.mopo.audiofingerprinter.tageditor.ACRCloudRecognizer.recognizeByFile(ACRCloudRecognizer.java:129)
at com.mopo.audiofingerprinter.tageditor.TestActivity$RecThread.run(TestActivity.java:84)`
EDIT2
Please note that the feaures I am using libACRCloudEngine.so is working perfectly. So it's libACRCloudExtrTool.so that is the problem here.
put this line in app build.gradle,it represent the path of .so files.
android {
.
.
sourceSets {
main {
jniLibs.srcDirs = ['jniLibs']
}
}
}
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.
I am receiving this exception while creation of signed apk of my application.
Proguard returned with error code 1. See console
java.io.IOException: Can't read [C:\Users\xx\Desktop\APP\xx\Users\imac\Amit\Workspace\xx\libs\universal-image-loader-1.9.4.jar] (No such file or directory)
at proguard.InputReader.readInput(InputReader.java:230)
at proguard.InputReader.readInput(InputReader.java:200)
at proguard.InputReader.readInput(InputReader.java:178)
at proguard.InputReader.execute(InputReader.java:100)
at proguard.ProGuard.readInput(ProGuard.java:196)
at proguard.ProGuard.execute(ProGuard.java:78)
at proguard.ProGuard.main(ProGuard.java:492)
Caused by: java.io.IOException: No such file or directory
at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:50)
at proguard.InputReader.readInput(InputReader.java:226)
... 6 more
I'm getting this error while assemble release:
Warning: Exception while processing task java.io.IOException: Can't write [/Users/tuanchauict/pw/Android/xrmovies/app/build/intermediates/transforms/proguard/prod/release/jars/3/1f/main.jar] (Can't read [/Users/tuanchauict/pw/Android/xrmovies/app/build/intermediates/classes/prod/release(;;;;;;**.class)] (Duplicate zip entry [android/support/v7/a/a$a.class == android/support/v7/appcompat/R$attr.class]))
:app:transformClassesAndResourcesWithProguardForProdRelease FAILED
This is the stacktrace:
Caused by: java.io.IOException: Can't write [/Users/tuanchauict/pw/Android/xrmovies/app/build/intermediates/transforms/proguard/prod/release/jars/3/1f/main.jar] (Can't read [/Users/tuanchauict/pw/Android/xrmovies/app/build/intermediates/classes/prod/release(;;;;;;**.class)] (Duplicate zip entry [android/support/v7/a/a$a.class == android/support/v7/appcompat/R$attr.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 com.android.build.gradle.internal.transforms.BaseProguardAction.runProguard(BaseProguardAction.java:54)
at com.android.build.gradle.internal.transforms.ProGuardTransform.doMinification(ProGuardTransform.java:254)
at com.android.build.gradle.internal.transforms.ProGuardTransform.access$000(ProGuardTransform.java:63)
at com.android.build.gradle.internal.transforms.ProGuardTransform$1.run(ProGuardTransform.java:173)
at com.android.builder.tasks.Job.runTask(Job.java:49)
at com.android.build.gradle.tasks.SimpleWorkQueue$EmptyThreadContext.runTask(SimpleWorkQueue.java:41)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:223)
Caused by: java.io.IOException: Can't read [/Users/tuanchauict/pw/Android/xrmovies/app/build/intermediates/classes/prod/release(;;;;;;**.class)] (Duplicate zip entry [android/support/v7/a/a$a.class == android/support/v7/appcompat/R$attr.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 [android/support/v7/a/a$a.class == android/support/v7/appcompat/R$attr.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.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
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.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:65)
at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:74)
at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:74)
at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:74)
at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:74)
at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:74)
at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:53)
at proguard.InputReader.readInput(InputReader.java:184)
... 12 more
BUILD FAILED
I have searched around but no solution this case.
My dependencies:
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.google.android.gms:play-services-ads:10.0.1'
compile 'com.google.android.gms:play-services-analytics:10.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-crash:10.0.1'
(Posted on behalf of the OP).
I have figured out where the problem came from. I use a 3rd party library that somehow it included the R class from support library. Remove it out and the build works.
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