Android Proguard java.io.IOException:无法读取 [proguard.ClassPathEntry
大家好 当为 android 启用 proguard 时,在构建签名的 jar 时,我得到以下转储:
[2011-02-03 11:28:27 - VideoCreator] Proguard returned with error code 1. See console
[2011-02-03 11:28:27 - VideoCreator] java.io.IOException: Can't read [proguard.ClassPathEntry@49b290] (No such file or directory)
[2011-02-03 11:28:27 - VideoCreator] at proguard.InputReader.readInput(InputReader.java:230)
[2011-02-03 11:28:27 - VideoCreator] at proguard.InputReader.readInput(InputReader.java:200)
[2011-02-03 11:28:27 - VideoCreator] at proguard.InputReader.readInput(InputReader.java:178)
[2011-02-03 11:28:27 - VideoCreator] at proguard.InputReader.execute(InputReader.java:100)
[2011-02-03 11:28:27 - VideoCreator] at proguard.ProGuard.readInput(ProGuard.java:195)
[2011-02-03 11:28:27 - VideoCreator] at proguard.ProGuard.execute(ProGuard.java:78)
[2011-02-03 11:28:27 - VideoCreator] at proguard.ProGuard.main(ProGuard.java:499)
无法在网络上找到任何相关内容。有什么想法吗?
Hi All
When enabing proguard for android, while building the signed jar I get the following dump:
[2011-02-03 11:28:27 - VideoCreator] Proguard returned with error code 1. See console
[2011-02-03 11:28:27 - VideoCreator] java.io.IOException: Can't read [proguard.ClassPathEntry@49b290] (No such file or directory)
[2011-02-03 11:28:27 - VideoCreator] at proguard.InputReader.readInput(InputReader.java:230)
[2011-02-03 11:28:27 - VideoCreator] at proguard.InputReader.readInput(InputReader.java:200)
[2011-02-03 11:28:27 - VideoCreator] at proguard.InputReader.readInput(InputReader.java:178)
[2011-02-03 11:28:27 - VideoCreator] at proguard.InputReader.execute(InputReader.java:100)
[2011-02-03 11:28:27 - VideoCreator] at proguard.ProGuard.readInput(ProGuard.java:195)
[2011-02-03 11:28:27 - VideoCreator] at proguard.ProGuard.execute(ProGuard.java:78)
[2011-02-03 11:28:27 - VideoCreator] at proguard.ProGuard.main(ProGuard.java:499)
Could not find anything relevant on the net. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
ProGuard 无法找到(或读取)输入 jar 之一。如果你安装 ProGuard 4.5.1 而不是 4.4,它会打印出正确的文件名,这样你就可以找出它丢失的原因。
ProGuard can't find (or read) one of the input jars. If you install ProGuard 4.5.1 instead of 4.4, it will print out the proper file name, so you can find out why it is missing.
下载最新的 ProGuard 并将基本 sdk 工具文件夹(例如 c:/android-sdk/tools/proguard)中现有的 lib 文件夹替换为您下载的新文件夹。
就像埃里克说的,它会告诉你缺少了什么。您很可能在 -libraryjars 命令中使用了错误的路径。尝试删除
Download the latest ProGuard and replace the it's existing lib folder in your base sdk tools folder (ex. c:/android-sdk/tools/proguard) with the new one you've downloaded.
Like Eric said, it will then tell you what's missing. More than likely you've used the wrong path in -libraryjars command. Try removing
更新 ProGuard 确实有助于追踪问题。就我而言,这与我的 Mac 上的 JDK 配置有关,并且 rt.jar 和 jsse.jar 文件没有位于通常的位置。
我在这里找到了解决方案。
Updating ProGuard did help to track down the problem. In my case it was to do with the JDK configuration on my Mac and the rt.jar and jsse.jar files not being located in the usual place.
I found the solution here.
检查.jar的路径名中是否有空格。我刚刚遇到了同样的问题,升级到 ProGuard 4.6 并在错误消息中获得了更多信息,但问题仍然存在。然后我想可能是因为我的路径名中存在空格,我将路径名中的所有空格字符替换为“-”,ProGuard 再次像魅力一样工作:)
Check whether you got spaces in the path name of .jar. I just encountered this same problem, upgraded to ProGuard 4.6 and got more information in the error message but the problem persisted. Then I figured maybe it was because of spaces in my path name, I replaced all space characters in the path name to "-", ProGuard worked again like a charm :)
在 JDK1.8 中,两个 JAR 文件与 Proguard 期望的位置不同,通过符号链接修复它们:
In JDK1.8 two of the JAR files are in a different location to where Proguard expects them to be, symlinking them fixes it: