Proguard 错误:需要类路径分隔符 - 不确定在哪里需要将路径放在引号中
错误:
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
我完全意识到我的问题是我在 c:\program files\eclipse 目录中有 eclipse+android - 并且“程序”和“文件”之间的空格导致了这个问题。
我还知道解决方案是将这条路径放在引号中。
我的问题是在哪里放置这些引号。我是一个 ANT 菜鸟:并且正在遵循我在这里找到的指示:http://android-developers.blogspot.com/2010/09/proguard-android-and-licensing-server.html
我目前正在尝试了解更多有关ANT 如何与 PROGUARD 一起工作,知道在哪里用引号包裹路径 - 以及如何(我担心它在 XML 中,不确定会发生什么样的处理来转义字符等)
我有一个备份计划来移动所有内容超出“程序文件” - 但我真的很想正确解决这个问题,并且觉得移动该项目是一种黑客/承认失败。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
ProGuard 不喜欢包含空格的路径。因此,我总是将 Android SDK 直接安装在 C:\ ==> 下
C:\android-sdk-windows
。ProGuard doesn't like paths that contain spaces. I therefore always install the Android SDK directly under C:\ ==>
C:\android-sdk-windows
.如果您手动指定 Android SDK 和 Proguard 位置的路径,则始终可以使用路径的缩写形式:
c:\progra~1\eclipse
Windows 长文件名的旧时代,但它至少在 XP 上仍然可以工作(我相信以后,但我还没有使用过 7 或 Vista 来确定)。
至于引号,我不知道 - 我主要使用 Linux,而在 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.
将 sdk.dir=C:\\Progra~1\\Eclipse\\android-sdk-windows 添加到 local.properties 文件中。
确保该路径与您机器上的路径匹配
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
好的,现在我找到了解决这个问题的一种方法
1、将“PROGUARD_HOME”EVN PATH设置为\tools\proguard
2、重启eclipse
3、现在可以正常使用了!
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!
这对我有用:
将以下行添加到您的default.properties文件中:
external.libs.dir=libs
来源:http://zed.0xff.me/2010/12/22/expecting-class-path-separator-before-in-argument-number -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