First, check the file "project. properties:
"Ant. properties" file, rewrite some values to adapt to your project structure. (Translation is very watery. Do not take it seriously)
This file is a code obfuscation configuration file written by Google in the tools/proguard folder of the SDK. It is a basic android code obfuscation configuration file.
Continue viewing the proguard-project.txt file:
#-Keepclassmembers class fqcn. of. javascript. interface. for. webview {
# Public *;
#}
Translation completed...
Through the annotations of the two files, we can draw a conclusion:
With this sentence, code obfuscation is enabled.
Proguard-project.txt in.
If the third-party library is not introduced, the general proguard-android.txt rules are enough, but if there is a third-party library, in the case of confusion to ignore the third-party library, this requires adding rules to the proguard-project.txt file. (Android. support. ** has been processed in proguard-android.txt, So If android. support. v4 is used, you do not need to add code obfuscation rules ).
For the processing of the third sub-database, refer to: http://blog.csdn.net/u_xtian/article/details/7495023
Specifically, add in proguard-project.txt:
-Libraryjars **. jar (declare the lib file)
-Dontwarn com. xx. bbb. ** (no warning is prompted)
-Keep class com. xx. bbb. ** {*;} (do not confuse)
For example, Baidu map:
-Libraryjars libs/baidumapapi_v2_ipv3.jar
-Dontwarn com. baidu. mapapi .**
-Dontwarn com. baidu. platform .**
-Dontwarn com. baidu. location .**
-Dontwarn com. baidu. vi .**
-Dontwarn vi.com. gdi. bgl. android .**
-Keep class com. baidu. mapapi .**{*;}
-Keep class com. baidu. platform .**{*;}
-Keep class com. baidu. location .**{*;}
-Keep class com. baidu. vi .**{*;}
-Keep class vi.com. gdi. bgl. android .**{*;}
Some may be confused. I know how to avoid code obfuscation, but it is actually very easy to find these package names. Open Android Private Libraries.