7

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.

Mampersat
  • 382
  • 1
  • 3
  • 16
  • I ended up moving my eclipse + SDK installs to c:/development and removing spaces from the project directory name as well. I now have 3-4 versions of the code floating around that I need to clean up - but I was able to create an obfuscated version of the app to publish. – Mampersat Dec 06 '10 at 15:38

6 Answers6

10

In Eclipse: Window > Preferences > Android > SDK Location

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

Dhanuka
  • 2,826
  • 5
  • 27
  • 38
Mark
  • 7,446
  • 5
  • 55
  • 75
1

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

olafure
  • 3,518
  • 2
  • 33
  • 45
1

ProGuard doesn't like paths that contain spaces. I therefore always install the Android SDK directly under C:\ ==> C:\android-sdk-windows.

ef2011
  • 10,431
  • 12
  • 49
  • 67
0

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.

mbafford
  • 2,266
  • 1
  • 20
  • 25
0

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

Muzikant
  • 8,070
  • 5
  • 54
  • 88
0

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!

Hikmat Khan
  • 6,434
  • 2
  • 25
  • 22