在Eclipse中使用Proguard for Android得到错误 [英] Using Proguard for Android in Eclipse got Error

查看:136
本文介绍了在Eclipse中使用Proguard for Android得到错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have taken a fresh install of Eclipse and all the latest Android tools and want to use Proguard on existing project, but for now I have created a new blank one. I have added a proguard.cfg file to my project added proguard.config=proguard.cfg to my default.properties

现在,当我尝试导出我得到以下错误

Now when I try to export I get the following error

[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.

我知道这意味着文件路径设置不正确,问题是我看过的地方通过一般属性和项目属性,看不到任何提及保护或混淆的参考,所以我坚持要改变什么

I know it means there is a filepath setup incorrectly, question is where the heck is as I have looked through the general properties and project properties and can't see any reference to proguard or obfuscation so am stuck on what to change

任何帮助赞赏。

推荐答案

您需要定义不带空格的Android SDK路径。通过Mark从这个答案复制并粘贴:

You need to define your Android SDK path without spaces. Copy&Paste from this answer by Mark:

Proguard错误:期望类路径分隔符 - 不知道我需要在引号中放置路径


是的,这对我有用。要将它
具体:

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

在Eclipse中:窗口>首选项>
Android> SDK位置

In Eclipse: Window > Preferences > Android > SDK Location

使用像
c:\Progra〜1\android-sdk(或者可能是64位的c:\Progra〜2\android-sdk)的东西

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

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

这篇关于在Eclipse中使用Proguard for Android得到错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆