我添加proguard.config=proguard.cfg
到我的 default.properties 文件并在我的项目根目录中有一个 proguard.cfg 文件。如果我现在在 Eclipse 中使用 Export as Android Application,我会收到以下错误:
[2011-01-27 11:11:37 - Application] Warning: class [classes/com/package.Class.class] unexpectedly contains class [com/package.Class]
[2011-01-27 11:11:37 - Application] Warning: class [classes/com/package.Class2.class] unexpectedly contains class [com/package.Class2]
[2011-01-27 11:11:37 - Application] Note: there were 145 duplicate class definitions.
[2011-01-27 11:11:37 - Application] Warning: there were 146 classes in incorrectly named files.
[2011-01-27 11:11:37 - Application] You should make sure all file names correspond to their class names.
[2011-01-27 11:11:37 - Application] The directory hierarchies must correspond to the package hierarchies.
[2011-01-27 11:11:37 - Application] If you don't mind the mentioned classes not being written out,
[2011-01-27 11:11:37 - Application] you could try your luck using the '-ignorewarnings' option.
[2011-01-27 11:11:37 - Application] java.io.IOException: Please correct the above warnings first.
[2011-01-27 11:11:37 - Application] at proguard.InputReader.execute(InputReader.java:133)
[2011-01-27 11:11:37 - Application] at proguard.ProGuard.readInput(ProGuard.java:195)
[2011-01-27 11:11:37 - Application] at proguard.ProGuard.execute(ProGuard.java:78)
[2011-01-27 11:11:37 - Application] at proguard.ProGuard.main(ProGuard.java:499)
似乎我的类以某种方式保存在一个类子文件夹中,但 Proguard 使用这个类子文件夹作为一个包。因此,Proguard 无法理解类的定义。
这是我的 SDK 设置的问题吗?还是我的 Proguard 配置中有错误导致此问题?