Although there are many related blogs on the Internet, they do not seem to be the latest version .. So the open-source demo on Baidu + Google + github finally successfully configured android proguard. The default configuration of the latest android sdk can meet most of our requirements. We only need to follow the sdk prompts to configure most of the required configurations, then add some basic custom configurations. Step 1: cancel the comments about proguard in project. properties. In this step, proguard can be enabled. Based on the blog on the Internet, it is best to add the sdk path. Sdk. dir = D: // Java/IDE/adt-bundle-windows-x86_64-20130219/sdkproguard. config =$ {sdk. dir}/tools/proguard/proguard-android.txt: proguard-project.txt so that the default configuration file will also be included. Step 2: Save the class called by AndroidManifest. xml or webview. This is because proguard will remove the code that is not called. -Keepclassmembers class fqcn. of. javascript. interface. for. webview {public *;}-keep public class * extends android. app. activity-keep public class * extends android. app. application-keep public class * extends android. app. service-keep public class * extends android. content. broadcastReceiver-keep public class * extends android. content. contentProvider-keep public class * extends android. app. backup. BackupAgentHelper-keep public class * extends android. preference. Preference Step 3: Third-party class library. # Third-party class library-keep class android. ** {*;}-keep class com. jeremyfeinstein. slidingmenu. lib. ** {*;}-keep class com. actionbarsherlock. ** {*;}-keep class com. lidroid. xutils. ** {*;} in Step 4, this step can replace all the above keep statements to minimize the probability of accidental deletion. That is, keep all classes with public access permissions and their public members. -Step 5 of keepclasseswithmembers class * {public *;}: Delete the Log Code-assumenosideeffects class android, which was introduced in the open-source proguarddemo on github. util. log {public static *** e (...); public static *** w (...); public static *** wtf (...); public static *** d (...); public static *** v (...);} then run it. It is obfuscated and can be run...