* Configure signature information
* Configure ProGuard to add ProGuard. config = proguard. cfg to proguard.
After the obfuscator is run, the output files are:
Dump.txt
The internal structure of all class files in the pai.apk package.
Mapping.txt
Lists the mappings between source code and obfuscated classes, methods, and attribute names. This file is useful for bug reports after construction, because it translates obfuscated stack trace information into classes, methods, and member names in the source code. For more information, view the decoded stack trace information.
Seeds.txt
List unobfuscated classes and members.
Usage.txt
Code extracted from .apk
# No optimization solution
-Dontoptimize
# Retain the signature to solve the generic problem
-Keepattributes Signature
-Dontskipnonpubliclibraryclassmembers
-Dontskipnonpubliclibraryclasses
# Third-party packages used in the project
-Libraryjars libs/android-support-v4.jar
# Do not confuse third-party packages
-Keep class android. support. v4 .**
# Exceptions caused by ignoring third-party packages
-Dontwarn android. support. v4 .**
--------------------------- The exception information is as follows [proguard] Note: there were 1 references to unknown classes.
[Proguard] You shocould check your configuration for typos.
[Proguard] Warning: there were 269 unresolved references to classes or interfaces.
[Proguard] You may need to specify additional library jars (using '-libraryjars '),
[Proguard] or perhaps the '-dontskipnonpubliclibraryclasses' option.
[Proguard] Warning: there were 57 unresolved references to program class members.
[Proguard] Your input classes appear to be inconsistent.
[Proguard] You may need to recompile them and try again.
[Proguard] Alternatively, you may have to specify the options
[Proguard] '-dontskipnonpubliclibraryclasses' and/or
[Proguard] '-dontskipnonpubliclibraryclassmembers '.
BUILD FAILED
D: \ android-sdk-windows \ tools \ ant \ build. xml: 736: Please correct the above warnings first.
References: Android tutorials
Official ProGuard website http://proguard.sourceforge.net/
Gson Packaging Problem http://blog.csdn.net/codingandroid/article/details/9495405
? How to handle Android imported packages? There are two types: third-party, and dynamic jar packages with source code. Do you need to set Obfuscation? Currently, no settings are required.