关于Proguard的问题

关于Proguard的问题

本文介绍了关于Proguard的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我混淆使用ProGuard 4.7我的申请。从那以后,我使用Dex2Jar解开我的申请。而我却高兴不起来与混淆的结果。我有以下问题:

1。如何掩盖字符串常量?

(可能使用此选项:一个字符串常量从服务器加载。
    我知道,这会影响性能,但防守为主)

2。如何重命名标准的类名?

例如:混淆后非标准类名保持不变。
(可以使所有的标准类的副本,然后将ProGuard的重新命名他们)

3.. ProGuard has created many new packages, but all the working classes are in one of them. How to place them in different packages?

4.. Why are some names of my classes have not changed?

解决方案

Question 2. You can't have ProGuard rename those as they are part of the phone. You don't loose any obfuscation security with external classes not obfuscated. Attempting to make local copies that you include with your app will only lead you down a path of ruin, you want the versions that are on the phone.

Question 3. That is expected, and relates to question 4. Anything part of the package that contains your Activities (or other public entry points) needs to maintain that path.

So if you have packages:

com.mycompany.myapp.activities

Then the activities package must be fully retained because any activity classes will not be obfuscated. Also com.mycompay.myapp must be retain for any item referenced from XML so the system can correctly find your entry as defined in the manifest.

It sounds like ProGuard is working as it should be in your setup.

这篇关于关于Proguard的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 23:33