Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proguard ParseException with Default proguard.cfg on Android

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)
like image 462
Osman.Gerwas Avatar asked Mar 03 '26 09:03

Osman.Gerwas


2 Answers

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.

like image 136
Osman.Gerwas Avatar answered Mar 04 '26 21:03

Osman.Gerwas


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.

like image 29
Eric Lafortune Avatar answered Mar 04 '26 23:03

Eric Lafortune