Proguard 不让我导出 apk

发布于 2024-12-13 20:52:15 字数 1036 浏览 1 评论 0原文

当我尝试在 Eclipse 中导出项目时遇到问题。 在尝试创建 apk 时出现此错误。 什么可能导致这种情况?

[2011-11-06 17:29:50 - Project- X] Proguard returned with error code 1. See console 
[2011-11-06 17:29:50 - Project- X] java.io.FileNotFoundException: C:\android\tools\proguard\bin\X\proguard\dump.txt (The system cannot find the path specified) 
[2011-11-06 17:29:50 - Project- X]      at java.io.FileInputStream.open(Native Method) 
[2011-11-06 17:29:50 - Project- X]      at java.io.FileInputStream.<init>(Unknown Source) 
[2011-11-06 17:29:50 - Project- X]      at java.io.FileReader.<init>(Unknown Source) 
[2011-11-06 17:29:50 - Project- X]      at proguard.FileWordReader.<init> FileWordReader.java:46) 
[2011-11-06 17:29:50 - Project- X]      at proguard.ConfigurationParser.parseIncludeArgument(ConfigurationParser.java: 196)
[2011-11-06 17:29:50 - Project- X]      at proguard.ConfigurationParser.parse(ConfigurationParser.java:105) 
[2011-11-06 17:29:50 - Project- X]      at proguard.ProGuard.main(ProGuard.java:491)

I have a problem when I'm trying to export my project in eclipse.
While trying to create the apk gives me this error.
What could cause this?

[2011-11-06 17:29:50 - Project- X] Proguard returned with error code 1. See console 
[2011-11-06 17:29:50 - Project- X] java.io.FileNotFoundException: C:\android\tools\proguard\bin\X\proguard\dump.txt (The system cannot find the path specified) 
[2011-11-06 17:29:50 - Project- X]      at java.io.FileInputStream.open(Native Method) 
[2011-11-06 17:29:50 - Project- X]      at java.io.FileInputStream.<init>(Unknown Source) 
[2011-11-06 17:29:50 - Project- X]      at java.io.FileReader.<init>(Unknown Source) 
[2011-11-06 17:29:50 - Project- X]      at proguard.FileWordReader.<init> FileWordReader.java:46) 
[2011-11-06 17:29:50 - Project- X]      at proguard.ConfigurationParser.parseIncludeArgument(ConfigurationParser.java: 196)
[2011-11-06 17:29:50 - Project- X]      at proguard.ConfigurationParser.parse(ConfigurationParser.java:105) 
[2011-11-06 17:29:50 - Project- X]      at proguard.ProGuard.main(ProGuard.java:491)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

那片花海 2024-12-20 20:52:15

您是否按照此处描述的步骤来配置 proguard 并在Eclipse 还是 Ant 构建?

因为这里生成了一个异常,因为找不到文件“dump.txt”,并且应该是在运行 proguard 时发生的...

Have you followed the steps described here to configure proguard and run it in an Eclipse or Ant build ?

Because you have here an exception generated because the file "dump.txt" wasn't found, and it's supposed to be when you run proguard...

酒绊 2024-12-20 20:52:15

当 eclipse 无法从 sdk 目录中读取 progaurd 文件时,也会出现此问题。

对于我来说,我的项目中存在 dump.txt 文件,但 Eclipse 仍然无法读取它。

我通过将 project.properties 文件中的 sdk 路径更改

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

我的 sdk 所在位置来

progaurd.config=D:\Backup\Desktops\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\tools\proguard\proguard-android.txt:proguard-project.txt

修复此问题。

This issue also comes when eclipse is not able to read the progaurd file from the sdk directory.

For me dump.txt file was present in my project, still eclipse was not able to read it.

I fixed this by changing the sdk path in the project.properties file

from

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

to

progaurd.config=D:\Backup\Desktops\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\tools\proguard\proguard-android.txt:proguard-project.txt

where my sdk was located.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文