android - 在 Eclipse 中使用 Proguard for Android 出错

标签 android eclipse proguard

我已经全新安装了 Eclipse 和所有最新的 Android 工具,并希望在现有项目上使用 Proguard,但现在我创建了一个新的空白工具。 我在我的项目中添加了一个 proguard.cfg 文件 将 proguard.config=proguard.cfg 添加到我的 default.properties

现在当我尝试导出时出现以下错误

[2010-12-12 10:36:35 - ApplicationTest] Proguard returned with error code 1. See console
[2010-12-12 10:36:35 - ApplicationTest] 'C:\Program' is not recognized as an internal or external command,
[2010-12-12 10:36:35 - ApplicationTest] operable program or batch file.
[2010-12-12 10:36:35 - ApplicationTest] '-jar' is not recognized as an internal or external command,
[2010-12-12 10:36:35 - ApplicationTest] operable program or batch file.

我知道这意味着文件路径设置不正确,问题是我查看了一般属性和项目属性,但看不到任何对 proguard 或混淆的引用,所以我坚持要更改的内容

任何帮助表示赞赏。

最佳答案

您需要定义不带空格的 Android SDK 路径。从马克的这个答案中复制和粘贴:

Proguard error: Expecting class path seperator - not sure where I need to put a path in quotes

Yep, that worked for me. To put it specifically:

In Eclipse: Window > Preferences > Android > SDK Location

use something like c:\Progra~1\android-sdk (or maybe c:\Progra~2\android-sdk on 64bit)

对我来说路径是 "c:\Progra~1\Android\android-sdk-windows"

关于android - 在 Eclipse 中使用 Proguard for Android 出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4421262/

相关文章:

android - 检测点击android后退按钮以关闭键盘

eclipse - 警告 : Someone is trying to access a secure resource :/WEB-INF/login. xhtml

Eclipse 菜单项执行 Shell 命令到控制台

java - 如何在 Eclipse 中的类型层次结构中查找特定类?

android - Proguard 与 Unity3d 返回错误代码 1

java - 如何防止混淆器从输出 jar 中删除 "module-info.class"?

java - 使用类和索引单击元素时出现问题

android - 如何将对 "video/photo"附加的支持从 whatsapp 等应用程序添加到我的应用程序?

android - 在运行异步任务时禁用 android 中的主页按钮

android - 使用 GSON 库导出/签名 Android 项目