Site icon 咖啡偶-IT日常

android 上架把log停掉

-dontskipnonpubliclibraryclasses
-dontobfuscate
-forceprocessing
-optimizationpasses 5
-keep class * extends android.app.Activity
-assumenosideeffects class android.util.Log {
public static *** d(…);
public static *** v(…);
}

編輯proguard-rules.pro

buildTypes {
release {
minifyEnabled true
shrinkResources false
proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt’), ‘proguard-rules.pro’
}
}

確認 build.gradle 裡面的 buildTypes 屬性
Exit mobile version