The error:
BUILD FAILED
C:\workspace\projectName\add-proguard-release.xml:35: Expecting class path separator ';' before 'Files\eclipse\android-sdk-windows\platforms\android-3\android.jar' in argument number 1
I am fully aware that my problem is that I have eclipse+android in the c:\program files\eclipse directory - and the space between 'program' and 'files' is causing this problem.
I am also aware that a solution is to put this path in quotes.
My problem is WHERE to put these quotes. I'm a bit of an ANT noob: and am following the directions I found here: http://android-developers.blogspot.com/2010/09/proguard-android-and-licensing-server.html
I'm currently trying to figure out enough more about how ANT works with PROGUARD to know where to wrap a path with quotes - and how (I'm worried it's in XML and not sure what kind of processing is going to happen to escape characters etc)
I have as a backup plan to move everything out of "program files" - but I'd really like to solve this problem correctly, and feel moving the project is a hack/admitting defeat.
In Eclipse: Window > Preferences > Android > SDK Location
use something like c:\Progra~1\android-sdk (or maybe
c:\Progra~2\android-sdk on 64bit)
This worked for me:
add following line to your default.properties file:
external.libs.dir=libs
Source: http://zed.0xff.me/2010/12/22/expecting-class-path-separator-before-in-argument-number-1
ProGuard doesn't like paths that contain spaces. I therefore always install the Android SDK directly under C:\ ==> C:\android-sdk-windows
.
If you're specifying the paths for the Android SDK and Proguard locations manually, you can always use the short form of the path:
c:\progra~1\eclipse
It's a throw-back to the age old days of Windows long file names, but it still works in at least up to XP (and I believe later, but I haven't used 7 or Vista enough to be sure).
As for the quotes, I don't know - I'm on Linux primarily, and on Windows I made it a point to never put spaces in my paths for development projects - too many things have issues with that.
Add sdk.dir=C:\\Progra~1\\Eclipse\\android-sdk-windows
to your local.properties file.
Make sure the path matches the one on your machine
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!