从前一个项目切换到此项目然后尝试导出它时,我一直收到此错误:
Proguard returned with error code 1. See console
Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [modonelib.jar:META-INF/MANIFEST.MF])
Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [mymainlib.jar:META-INF/MANIFEST.MF])
java.io.IOException: Can't write [C:\Users\ih8ie8\AppData\Local\Temp\android_8070931993503351509.jar] (Can't read [C:\workspace\MyMainLib\bin\mymainlib.jar] (Unexpected end of ZLIB input stream))
at proguard.OutputWriter.writeOutput(OutputWriter.java:264)
at proguard.OutputWriter.execute(OutputWriter.java:160)
at proguard.ProGuard.writeOutput(ProGuard.java:372)
at proguard.ProGuard.execute(ProGuard.java:153)
at proguard.ProGuard.main(ProGuard.java:492)
Caused by: java.io.IOException: Can't read [C:\workspace\MyMainLib\bin\mymainlib.jar] (Unexpected end of ZLIB input stream)
at proguard.InputReader.readInput(InputReader.java:230)
at proguard.InputReader.readInput(InputReader.java:200)
at proguard.OutputWriter.writeOutput(OutputWriter.java:253)
... 4 more
Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(Unknown Source)
at java.util.zip.InflaterInputStream.read(Unknown Source)
at java.util.zip.ZipInputStream.read(Unknown Source)
at java.util.zip.ZipInputStream.closeEntry(Unknown Source)
at java.util.zip.ZipInputStream.getNextEntry(Unknown Source)
at proguard.io.JarReader.read(JarReader.java:58)
at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:65)
at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:53)
at proguard.InputReader.readInput(InputReader.java:226)
... 6 more
如果我退出并重启Eclipse两次,然后重复相同的步骤,则问题就会消失。
虽然我最终能够构建一个可部署的应用程序,但我更喜欢一劳永逸地摆脱这个错误(我的工作区中的其他应用程序不会发生这种情况)。
知道如何排除故障吗?
我希望在哪里找到这个“重复的zip条目”?
答案 0 :(得分:2)
Eclipse构建过程创建了一个中间jar C:\ workspace \ MyMainLib \ bin \ mymainlib.jar,ProGuard随后将其作为输入jar读取。那时,它似乎被截断了。也许文件系统有问题?在构建之后,您可以检查中间jar是否未损坏。如果没问题,问题可能是当ProGuard读取文件时文件尚未刷新到磁盘。我看到的唯一解决方法是使用Ant来执行发布版本。