3

我在使用 proguard 时有一些非常奇怪的行为。这是情况。

在 Eclipse 中,如果我只运行导出命令,则会出现以下错误。伴随着许多can't find referenced class错误。下面的数字 241 似乎也跳来跳去,有时是 179、290 等。

[2012-05-22 15:54:33 - x] Warning: there were 241 unresolved references to classes or interfaces.
[2012-05-22 15:54:33 - x]          You may need to specify additional library jars (using '-libraryjars').
[2012-05-22 15:54:33 - x] Warning: there were 36 unresolved references to program class members.
[2012-05-22 15:54:33 - x]          Your input classes appear to be inconsistent.
[2012-05-22 15:54:33 - x]          You may need to recompile them and try again.
[2012-05-22 15:54:33 - x]          Alternatively, you may have to specify the option 
[2012-05-22 15:54:33 - x]          '-dontskipnonpubliclibraryclassmembers'.
[2012-05-22 15:54:33 - x] java.io.IOException: Please correct the above warnings first.
[2012-05-22 15:54:33 - x]   at proguard.Initializer.execute(Initializer.java:321)
[2012-05-22 15:54:33 - x]   at proguard.ProGuard.initialize(ProGuard.java:211)
[2012-05-22 15:54:33 - x]   at proguard.ProGuard.execute(ProGuard.java:86)
[2012-05-22 15:54:33 - x]   at proguard.ProGuard.main(ProGuard.java:492)

但是如果我做一个干净然后导出它不会显示错误,也不会显示任何控制台输出。清理后的第一次导出将生成一个运行的文件。如果我在上次导出后立即尝试进行导出,它将再次失败并出现上述错误。

附加信息 -

我的工作区路径和 git repo 路径都没有空格。

我的 proguard.cfg 文件主要是 android/eclipse 提供的默认文件,只添加了一些额外的“keep”

我的项目有一个旧的工作区设置,我可以使用 proguard 成功导出(这个项目通过 OS X 上的 subclipse 使用 SVN)。

我将项目复制到当前工作区并使用 egit 将其连接到 GIT。Egit 将文件从我的工作区移到了 git repo 的位置。

TL;博士; 是什么让 proguard 在清理后成功运行但每次运行时都失败而没有先清理?

4

0 回答 0