在新建项目时提示找不到proguard.cfg
解决方案:在tool/lib 目录下新建 proguard.cfg内容如下
-optimizationpasses 5
-dontusemixedcaseclassnam
-dontskipnonpubliclibrary
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-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
-keepclasseswithmembernam
native ;
}
-keepclasseswithmembernam
public (android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernam
public (android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}