注意:这里有一个坑。就是-ignorewarnings
他老是混淆不了,告诉你不行。其实加上这句话,就可以了。
下面贴一下代码:
-injars c:/ceb_lib.jar
-outjars c:/proguard_out.jar
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-dontoptimize
-verbose
-ignorewarnings
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep class com.chinaCEB.cebUtils.**{*;}
-keep class com.chinaCEB.cebUtils.CebHelper
-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 com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepattributes *Annotation*
-keepattributes Signature
-keep class **.R$* {*;}
-dontwarn android.support.v4.**
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep public class * extends android.support.v4.**
-keep public class * extends android.app.Fragment
-keep class com.cebchina.lifepayment.** {*;}
-keep class com.magus.** {*;}
-keep class com.chinaCEB.cebActivity.shakeanimator.** {*;}
-keep class com.chinaCEB.cebView.guideView.** {*;}
-libraryjars libs/android-support-v4.jar
-libraryjars libs/android.jar
-libraryjars libs/Android_SDK_component.jar
-libraryjars libs/Android_SDK.jar
-libraryjars libs/barcode.jar
-libraryjars libs/commons-httpclient-3.0.1.jar
-libraryjars libs/gson-2.2.2.jar
-libraryjars libs/httpmime-4.1.3.jar
-libraryjars libs/locSDK_3.3.jar
-libraryjars libs/nineoldandroids-2.4.0.jar
-libraryjars libs/UPPayAssistEx.jar
-libraryjars libs/UPPayPluginEx.jar
-keep class org.apache.commons.httpclient.** {*;}
-keep class org.apache.commons.codec.** {*;}
-keep class com.tencent.mm.** {*;}
-keep class android.net.http.** {*;}
-keep class com.sina.** {*;}
-keep class com.sina.weibo.sdk.** {*;}
-keep class com.tencent.weibo.sdk.** {*;}
-keep class com.google.** {*;}
-keep class com.networkbench.agent.** {*;}
-dontwarn org.apache.commons.httpclient.**
-dontwarn org.apache.commons.codec.**
-dontwarn com.tencent.mm.**
-dontwarn android.net.http.**
-dontwarn com.sina.sso.**
-dontwarn com.sina.weibo.sdk.**
-dontwarn com.tencent.weibo.sdk.**
-dontwarn com.networkbench.agent.**
#-keep class com.chinaCEB.cebView.**
#-keep class com.magus.**
#-keep class com.pinyin4android.**