I am trying to remove the log statements without success. Other SO answers to the same question refer to Eclipse or to an old Android Studio IDE (Intellij).
build.gradle
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
...
proguard-rules.pro
-assumenosideeffects class android.util.Log {
public static *** d(...);
public static *** v(...);
public static *** i(...);
public static *** w(...);
public static *** e(...);
}
I can still see the log statements after getting the source code from the signed app-release.apk
a change in the build.gradle, replacing the default proguard-android.txt with proguard-android-optimize.txt did the trick.
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
...
Note: the default proguard setting in gradle is proguard-android.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With