Android Studio 打包混淆
-keepattributes Annotation
-keepattributes JavascriptInterface
-keepclassmembers class com.bwvip.sporteducation.Activity.WebActivity$JSAndroidInterface {
public *;
}
-keepclassmembers class com.bwvip.sporteducation.Activity.NewsDetailActivity$JSAndroidInterface {
public *;
}
Add project specific ProGuard rules here.
By default, the flags in this file are appended to flags specified
in D:\sdk/tools/proguard/proguard-android.txt
You can edit the include path and order by changing the proguardFiles
directive in build.gradle.
For more details, see
http://developer.android.com/guide/developing/tools/proguard.html
Add any project specific keep options here:
If your project uses WebView with JS, uncomment the following
and specify the fully qualified class name to the JavaScript interface
class:
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
public *;
}
-keep class cn.sharesdk.{;}
-keep class com.sina.{;}
-keep class .R$ {;}
-keep class .R{;}
-keep class com.mob.{;}
-dontwarn
-ignorewarnings
-dontwarn com.mob.**
-dontwarn cn.sharesdk.**
-dontwarn .R$
-dontwarn javax.servlet.*
-dontwarn org.joda.time.**
-dontwarn org.w3c.dom.**
-dontwarn okio.**
-dontwarn javax.annotation.Nullable
-dontwarn javax.annotation.ParametersAreNonnullByDefault
-keepclassmembers class * {
public <init> (org.json.JSONObject);
}
-keep public class com.bwvip.sporteducation.R$*{
public static final int ;
}
-keepclassmembers enum * {
public static [] values();
public static ** valueOf(java.lang.String);
}
-keep class butterknife. { ; }
-dontwarn butterknife.internal.
-keep class **$$ViewBinder { *; }
-keepclasseswithmembernames class * {
@butterknife.* <fields>;
}
-keepclasseswithmembernames class * {
@butterknife.* <methods>;
}
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
Okio
-dontwarn com.squareup.**
-keep public class org.codehaus.* { ; }
-keep public class java.nio. { *; }
-dontwarn org.apache.http.**
-keep class org.apache.http.** { *;}
BaseRecyclerViewAdapterHelper
-keep class com.chad.library.adapter.** {
*;
}
-keep public class * extends com.chad.library.adapter.base.BaseQuickAdapter
-keep public class * extends com.chad.library.adapter.base.BaseViewHolder
-keepclassmembers public class * extends com.chad.library.adapter.base.BaseViewHolder {
<init>(android.view.View);
}
If your project uses WebView with JS, uncomment the following
and specify the fully qualified class name to the JavaScript interface
class:
-keepattributes Annotation
-keepattributes JavascriptInterface
-keepclassmembers class com.bwvip.sporteducation.Activity.WebActivity$JSAndroidInterface {
public *;
}
-keepclassmembers class com.bwvip.sporteducation.Activity.JsCallAndroid$JSAndroidInterface {
public *;
}