Using Proguard for Android in Eclipse got Error

為{幸葍}努か 提交于 2019-12-03 04:36:13
Asmo Soinio

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

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)

For me the path is "c:\Progra~1\Android\android-sdk-windows"

According to comments posted by a Google Engineer in thread here: http://groups.google.com/group/android-developers/browse_thread/thread/19b96902fc20cede

*.bat file shipped with ProGuard doesn't support paths with spaces.

Having Java and Android SDK installed on paths without spaces doesn't solve the problem completely. Things can go wrong if path to eclipse workspace, temp folder or some of external JAR files contains spaces as well.

I was too lazy to re-install everything so my workaround involves making junction points on a file system.

I just reinstalled JAVA and ANDROID in the root directory instead of under their default paths in program files and it all worked

Is there not a way to specify the direct paths ourselves to the Java and Android SDK in the proguard config file?

This problem looks to be fixed in ADT 12. The following change in main_rules.xml solves the problem and should be included in ADT 12: https://review.source.android.com/#change,22791.

I can verify that downloading the fixed version and replacing the copy that comes with the sdk at your_sdk_path/tools/ant fixes this issue.

OK , now i found one way to fix this problem 1, set up the "PROGUARD_HOME" EVN PATH to \tools\proguard 2, restart eclipse 3, now it work fine!

I changed the SDK paths to the 8.3 format and changed the proguard.jar folder in proguard.bat to the 8.3 format and now all is working again!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!