Another sleepless night.
The problem is, we write an Android project part of the code wants to build the jar package, and the jar is confused, not to be cut!
First of all, the code to generate the jar package, this is not much to say. Then find the Proguardgui.jar (directory: sdk\tools\proguard\lib\) found in the SDK and open it.
And you'll see Proguard's page.
Click Next for the first time, then look at the following page, click Addinput ... Add the jar package you want to confuse, click Add Output ... is to select the confusing jar package to save the directory. The bottom of the add ... Is the jar that your jar package relies on. (The black place is the item cannot be exposed)
Then directly click on the process, point 1 button is to view the configuration file, point 2 is to save the configuration file, save to Xxx.pro (such as Test.pro)
Then open your saved Test.pro to start adding classes and methods that are not confusing in your project
Then open Proguard again, add Test.pro
Click Process, and then you can see if the configuration information was changed by you, then click process!
OK, the confusion is complete, the confusion may be wrong, please follow the error to find a solution, most of the reason is because the configuration is written in a wrong format!
-optimizationpasses 5-dontusemixedcaseclassnames-dontskipnonpubliclibraryclasses-dontpreverify-verbose- Optimizations!code/simplification/arithmetic,!field/*,!class/merging/*-keep public class * extends Android.app.Activity//Inherit activity,application,service,broadcastreceiver,contentprovider .... No confusion-keep public class * extends Android.app.application-keep public class * extends Android.app.service-keep public cl 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 Pub Lic class Com.android.vending.licensing.ILicensingService
Please delete the Chinese when confused
-keep class com.lidroid.xutils.** {*;} The whole class is not confused
-dontwarn com.lidroid.xutils.**
Non-confusing 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 ();
}
The Android project confuses the generated jar package