android 上架把log停掉
-dontskipnonpubliclibraryclasses
編輯proguard-rules.pro
-dontobfuscate
-forceprocessing
-optimizationpasses 5
-keep class * extends android.app.Activity
-assumenosideeffects class android.util.Log {
public static *** d(…);
public static *** v(…);
}
buildTypes {
確認 build.gradle 裡面的 buildTypes 屬性
release {
minifyEnabled true
shrinkResources false
proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt’), ‘proguard-rules.pro’
}
}