如何进行模糊处理,通过Eclipse中使用ProGuard的APK?模糊、Eclipse、APK、ProGuard

2023-09-06 03:18:07 作者:爷.独霸天下

我添加 proguard.config = proguard.cfg 来我的default.properties文件,并在我的项目的根一个proguard.cfg文件。如果我现在在Eclipse中使用导出为Android应用程序从我得到以下错误:

I added proguard.config=proguard.cfgto my default.properties file and have a proguard.cfg file in my project root. If I now use Export as Android Application from within Eclipse I get the following Errors:

[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的理解。

It seems that somehow my classes are saved in a classes subfolder but Proguard uses this classes subfolder as a package. Therefore the definition of the classes can not be understood by Proguard.

这是我的SDK安装有问题?或者有没有在我的Proguard的配置错误造成这个问题?

Is this a problem with my SDK Setup? Or are there errors in my Proguard Configuration causing this problem?

推荐答案

现在是方便我刚刚更新到新的DDMS的Eclipse pluging版本:Android的DDMS 9.0.0.v201101191456-93220和更新我的SDK到新版本包括蜂窝,问题似乎消失了。

Now that is convenient I just updated to the the new ddms Eclipse pluging Version: Android DDMS 9.0.0.v201101191456-93220 and updated my SDK to the new Version that includes Honeycomb and the problem seems to be gone.

 
精彩推荐
图片推荐