After adding RxAndroid and Retrofit library to my gradle, and compile, I got the below error, shows in my Android Studio Message panel.
Error:Execution failed for task 
':app:transformClassesWithNewClassShrinkerForProductionDebug'.
> Warnings found during shrinking, please use -dontwarn or -ignorewarnings to suppress them.
In my Debug, I use
        minifyEnabled true
        useProguard false
I believe I could use -dontwarn or ignorewarnings to suprress and let the compilation continue. But I would like to know what warnings was that. Where could I find the warning?
Found it. Just need to open the Gradle Console (normally a tab at the right bottom) to look at the Gradle Log.
It is stated
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task 
':app:transformClassesWithNewClassShrinkerForProductionDebug'.
> Warnings found during shrinking, please use -dontwarn or -ignorewarnings to suppress them.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Optionally, I could just need to run the gradlew on command line with the --debug option.
./gradlew :app:transformClassesWithNewClassShrinkerForInternalDebug --debug
It is like the default shrinker has changed. Adding the configuration to turn on ProGuard started to work.
buildTypes {
    release {
        debuggable false
        minifyEnabled true
        useProguard true
        getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
    }
    debug {
        debuggable true
        minifyEnabled true
        useProguard true
        getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
    }
}
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