Proguard error: Expecting class path seperator - not sure where I need to put a path in quotes

若如初见. 提交于 2019-11-30 04:04:26

问题


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.


回答1:


In Eclipse: Window > Preferences > Android > SDK Location

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




回答2:


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




回答3:


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




回答4:


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.




回答5:


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




回答6:


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!



来源:https://stackoverflow.com/questions/4356979/proguard-error-expecting-class-path-seperator-not-sure-where-i-need-to-put-a

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