本文介绍了重复的类MultiDex $ V14.class的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的Android gradle构建在ProGuard阶段失败,并出现了MultiDex $ V14.class的重复类错误(请参见下文).我知道重复类是什么,我知道MultiDex是什么,但是我仍然不知道它是重复的.
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.
问题:
- 我看到一个定义当然在multidex.jar中.我怎么知道另一个在哪里定义?
- ProGuard是否应该删除重复条目而不是抱怨它们?
- 底部的出了什么问题"描述似乎与重复的类无关.是吗?
-
(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
推荐答案
两天后,我在lib..multidex 1.0.1中找到了问题,但是依赖项是1.0.0,因此只需杀死lib,现在开始工作
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
这篇关于重复的类MultiDex $ V14.class的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!