Proguard 错误:需要类路径分隔符 - 不确定在哪里需要将路径放在引号中

发布于 2024-10-05 16:31:39 字数 786 浏览 6 评论 0原文

错误:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

递刀给你 2024-10-12 16:31:40

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.

老旧海报 2024-10-12 16:31:40

如果您手动指定 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.

离去的眼神 2024-10-12 16:31:40

将 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

陌上芳菲 2024-10-12 16:31:40

好的,现在我找到了解决这个问题的一种方法
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!

在 Eclipse 中:窗口 >首选项>安卓> SDK位置

使用类似 c:\Progra~1\android-sdk 的东西(或者也许
c:\Progra~2\android-sdk(64 位)

In Eclipse: Window > Preferences > Android > SDK Location

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

明媚殇 2024-10-12 16:31:39

这对我有用:

将以下行添加到您的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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文