Android project obfuscated the generated jar package, androidjar
Another sleepless night
The problem is that we have written some android project code to generate a jar package and confuse the jar package without being cut by others!
First of all, you need to generate a jar package using the code. Find proguardgui. jar (directory: SDK \ tools \ proguard \ lib \) in the sdk and open it.
Then you will see the proguard page
Click Next for the first time, then go to the following page, click Addinput... to Add the jar package you want to confuse, and click Add output... to select the jar package to save the directory after obfuscation. Add... below is the jar that your jar package depends on. (The project cannot be exposed)
Click Process. Click 1 to view the configuration file. Click 2 to save the configuration file and save it as xxx. pro (for example, test. pro)
Open the test. pro file you saved and add classes and methods that are not obfuscated in your project.
Open Proguard again and add test. pro.
Click Process to check whether the configuration information has been modified. Then, click Process!
OK. obfuscation is complete. errors may occur during obfuscation. Follow the error prompts to find a solution. Most of the reasons are due to incorrect writing format during configuration!
-Optimizationpasses 5-dontusemixedcaseclassnames-dontskipnonpubliclibraryclasses-dontpreverify-verbose-optimizations! Code/simplification/arithmetic ,! Field /*,! Class/merging/*-keep public class * extends android. app. activity // inherits activity, application, service, broadcastReceiver, contentprovider .... do not confuse-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-keep public class com. android. vending. licensing. ILicensingService
Delete Chinese characters when Obfuscation
-Keep class com. lidroid. xutils. ** {*;} // the entire class is not obfuscated.
-Dontwarn com. lidroid. xutils .**
// Non-obfuscated classes and Methods
-Keepclasseswithmembers public final class com. mzc. demo. MyDemo {
Public MyDemo (android. content. Context, java. lang. String, android. widget. LinearLayout );
Public void openDoor ();
}
Zookeeper