1. Reference https://stuff.mit.edu/afs/sipb/project/android/sdk/android-sdk-linux/tools/proguard/docs/index.html Recent project summaries for official documents and online blogs2. Android Studio (hereafter abbreviated AS) has the default proguard-project.txt, which configures the path for the confusing configuration file under the Gradel of the project. actually for a proguard3 Confusing objects Proguard default is to confuse all files
No confusion is generally made in the following situations:
A four components, support package (General V4, V7)
b resource file, R file
C JS Call
D reflection and invocation of reflected classes
E JNI Invocation
f so libraries, jar packages (which are generally confusing)
4. Basic grammar because the information on the Web is omitted this part of this paper gives an important part:
A. A wildcard character similar to Java * * represents a class that matches all characters * * denotes all classes and their sub-paths of the package class
B. If you keep a class that does not confuse the -keep class name {*;} Class name is full name (contains package name)
C. Keep Subclasses of a class from being confused-keep * Extends class name {*;} It's like Java, isn't it?
E. Keeping a single method of a class unchanged-keepclassmembers class name { can contain a wildcard character method name}
F. Maintaining a class containing a method is not confused-keepclasseswithmembers class name { can contain wildcard characters }
See https://stuff.mit.edu/afs/sipb/project/android/sdk/android-sdk-linux/tools/proguard/docs/index.html#manual/usage.html
5 Other
A.optimize whether the algorithm is used for compression
B. shrink whether to delete unused (unused files) This should be careful like reflection, etc.
C -libraryjars for imported jar packages, so libraries (just imports) Gradel some have been configured to report a .... Twice's fault .
D Close Obfuscation dontobfuscate
PS: Open Confusion in Build.gradel: Buildtypes--"release--" minifyenabled true
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
On the problem of confusing file configuration under Android Studio (i)