Proguard ParseException with Default proguard.cfg on Android

南楼画角 提交于 2019-11-30 18:04:27

问题


I am about to release an application but, while i was building it using Export Tool of Android SDK in Eclipse, i get the error below.

  • I didn't change the proguard.cfg.
  • It is in the root folder of my project.
  • I only add proguard.config=proguard.cfg to default.properties.

I read the forum and update proguard (just copied the files to the tools folder of Android SDK), but still I doesn't work. I couldn't figure out what the problem is with the 'Projects\Eclipse' ??

If you help me, I will be so glad...

[2011-08-08 02:32:46 - CoolProject] Proguard returned with error code 1. See console
[2011-08-08 02:32:46 - CoolProject] proguard.ParseException: Unknown option 'Projects\Eclipse' in argument number 9
[2011-08-08 02:32:46 - CoolProject]     at proguard.ConfigurationParser.parse(ConfigurationParser.java:172)
[2011-08-08 02:32:46 - CoolProject]     at proguard.ProGuard.main(ProGuard.java:484)

回答1:


Yeah that is right, but also I did something that I didn't know :)

My solution was:

  1. I updated to latest Android SDK.
  2. I changed SDK path property under Eclipse: Window > Preferences > Android > SDK Location as something like c:\Progra~1\android-sdk. The Progra~1 can be used for writing Program Files witout spaces. You can use DIR /X command in command prompt on Windows to get no space versions of Paths.
  3. I moved my Eclipse Workspace to a location without spaces like D:\
  4. The changes above didn't enough to solve the problem. I got "Conversion to Dalvik format failed with error 1" error dialog witout any explanation on output console. Then I found that topic and did what that reply says.

Then it worked ;)

I am using Windows 7 Ultimate x86. I hope it works for others too. Arda.




回答2:


Your project path probably contains a space. This should be fixed in the latest version of the Android SDK (at least for the Ant build). Otherwise, you should use a path without spaces for the time being.



来源:https://stackoverflow.com/questions/6976625/proguard-parseexception-with-default-proguard-cfg-on-android

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