Gradle build process failed with "minifyEnabled" - Proguard
See original GitHub issueI’ve got received this error when minifyEnabled
is true
:
Error:Execution failed for task ':app:transformClassesWithNewClassShrinkerForDebug'.
> [PROJECT_PATH]/app/build/intermediates/exploded-aar/com.google.firebase/firebase-common/9.2.0/proguard.txt line 37:14 no viable alternative at input 'com.google.android.gms.common.util.DynamiteApi'
project build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath "com.google.gms:google-services:3.0.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
App build.gradle:
buildscript {
repositories {
jcenter()
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion '24.0.0'
defaultConfig {
applicationId "MY_APP_ID"
minSdkVersion 21
targetSdkVersion 24
versionCode 1
versionName "1.0.0"
vectorDrawables.useSupportLibrary = true
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
buildTypes {
debug {
minifyEnabled true
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile "com.android.support:support-v4:24.0.0"
compile "com.android.support:appcompat-v7:24.0.0"
compile "com.android.support:recyclerview-v7:24.0.0"
compile "com.android.support:cardview-v7:24.0.0"
compile "com.android.support:design:24.0.0"
compile "com.android.support:support-annotations:24.0.0"
// ... others libs
compile "com.google.firebase:firebase-messaging:9.2.0"
}
apply plugin: 'com.google.gms.google-services'
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Gradle build process failed with "minifyEnabled" - Proguard
When trying to compile my app I get the following error: ... Gradle build process failed with "minifyEnabled" - Proguard #327.
Read more >Gradle build failed when minify is enabled - Stack Overflow
Gradle build fails when I set minifyEnabled true in release type. I tried to include all the proguard rules but still getting error...
Read more >Gradel error with minifyEnabled false (Example) - Treehouse
It is using a version of Gradle that is unsupported (Android only supports 1.0 and up). The Gradle files seem to have gone...
Read more >Shrink, obfuscate, and optimize your app - Android Developers
When you build your project using Android Gradle plugin 3.4.0 or higher, the plugin no longer uses ProGuard to perform compile-time code optimization....
Read more >Provide a default proguard configuration [37009313]
Using Android Studio 0.9.1, with Gradle 0.14.1, I am working with a NDK project that is having problems when I try to set:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dsdebastiani this is a known issue (recently discovered) that the
9.2.0
client libraries do not work with the Jack compiler or the new Android class shrinker. While we work on a fix, you have the following options:9.0.2
libraries which are nearly identical to9.2.0
minus a few small fixes@hiepnm - Do we need to add all of the above lines or only the first line (-keep class com.firebase.** { *; }) ?