Firebaseui-android: Program type already present: com.google.android.gms.internal.zzcce

Created on 30 Mar 2018  ·  46Comments  ·  Source: firebase/FirebaseUI-Android

Program type already present: com.google.android.gms.internal.zzcce
Message{kind=ERROR, text=Program type already present: com.google.android.gms.internal.zzcce, sources=[Unknown source file], tool name=Optional.of(D8)}

This is my gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.garishat.altahir"
        minSdkVersion 17
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.0'
    implementation 'com.android.support:support-v4:27.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

    implementation 'com.firebaseui:firebase-ui-auth:3.3.0'
}

apply plugin: 'com.google.gms.google-services'

And project level:

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'
        classpath 'com.google.gms:google-services:3.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Please help, I spent all the morning from one problem to another...

Most helpful comment

I used @Diae-dm1303866 configuration, and it worked. Then I started tracking the source of problem, and I found that this lines solved it:

/....../
dependencies {
    /....../
    implementation 'com.google.firebase:firebase-core:12.0.1'
    implementation 'com.firebaseui:firebase-ui-auth:3.3.0'
    implementation 'com.android.support:cardview-v7:27.1.0'
}
/....../

Thank you :)

All 46 comments

@hiddeneyes02 what version of Android Studio are you using? Could you try adding the following lines to your gradle.properties file and seeing if anything changes?

android.enableR8 = false
android.enableD8 = false

I am using Android Studio 3.1, lastest

This is what I get with that:

The option 'android.enableD8' is deprecated and should not be used anymore.
Use 'android.enableD8=true' to remove this warning.
It will be removed in AGP version 3.3.

The same original error if I remove android.enableD8 = false or set it to true

I have to revert to firebase ui auth 3.0.0 to make things work right now.

@hiddeneyes02 what about FirebaseUI 3.2.2?

Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Could not determine artifacts for com.android.support:support-fragment:27.0.2: No cached version available for offline mode

If I update compileSdkVersion 27 and targetSdkVersion 27, I get the original error

@hiddeneyes02 are you working offline?

Can you try running from the command line:
./gradlew clean cleanBuildCache :app:assembleDebug

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\0.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\1.jar, D:\Fahed\LocalProjects\Android\Garishat\app\buil
d\intermediates\transforms\dexBuilder\debug\2.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\3.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\4.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\d
ebug\5.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\6.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\7.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\8.jar, D:\Fahed\LocalProjects\Andr
oid\Garishat\app\build\intermediates\transforms\dexBuilder\debug\9.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\10.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\12.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\
transforms\dexBuilder\debug\13.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\14.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\15.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\16.jar,
D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\17.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\18.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\19.jar, D:\Fahed\LocalProjects\Android\Garis
hat\app\build\intermediates\transforms\dexBuilder\debug\20.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\22.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\23.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transfor
ms\dexBuilder\debug\24.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\25.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\26.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\27.jar, D:\Fahed
\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\28.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\29.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\30.jar, D:\Fahed\LocalProjects\Android\Garishat\app\
build\intermediates\transforms\dexBuilder\debug\31.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\32.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\33.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBu
ilder\debug\34.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\35.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\36.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\37.jar, D:\Fahed\LocalPr
ojects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\38.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\39.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\40.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\in
termediates\transforms\dexBuilder\debug\41.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\42.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\43.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\de
bug\44.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\45.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\46.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\48.jar, D:\Fahed\LocalProjects\A
ndroid\Garishat\app\build\intermediates\transforms\dexBuilder\debug\50.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\52.jar, D:\Fahed\LocalProjects\Android\Garishat\app\build\intermediates\transforms\dexBuilder\debug\53.jar

With the same error. I should tell you the error occurs when trying to run the app, not when synchronizing gradle.

@hiddeneyes02 I am a bit stumped here, and I think it's very strange that I have not seen this same error from any other users.

@hiddeneyes02 I just recreated your exact project and here's how you can fix it:

Replace this:

classpath 'com.google.gms:google-services:3.2.0'

With this:

classpath 'com.google.gms:google-services:3.2.1'

It does do it for me neither, same error is appearing.

Hello everyone! I have the same problem as @hiddeneyes02 has described. Did you find a solution?

@mars885 No unfortunately... I didn't use this library because I needed to finish my project. I used Facebook and Google Signin separately.

I don't know if it was the same error but my problem was that I added Firebase UI Auth and Firebase Auth in Gradle, but Firebase Auth already comes with Firebase UI Auth. So after I removed the Firebase Auth SDK it worked again

Tried creating a fresh project and only importing google services + Firebase UI auth and the same error happens.

Same error is happening to me as well! :(
I have tried every single thing, but noting seems to work! :(

UPDATE:
I updated my firebase dependency from 3.2.0 to 3.3.0 and it started working!
Try it and see if that will work for you!

This is my gradle.module:

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
applicationId "iotapp.senior.seniorappdesign"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

    }
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
//noinspection GradleCompatible
compile 'com.google.firebase:firebase-core:12.0.1'
_compile 'com.firebaseui:firebase-ui-auth:3.3.0'_

implementation 'com.android.support:cardview-v7:26.1.0'

}
apply plugin: 'com.google.gms.google-services'
configurations.all { exclude group: 'com.android.support', module: 'support-v13' }

I used @Diae-dm1303866 configuration, and it worked. Then I started tracking the source of problem, and I found that this lines solved it:

/....../
dependencies {
    /....../
    implementation 'com.google.firebase:firebase-core:12.0.1'
    implementation 'com.firebaseui:firebase-ui-auth:3.3.0'
    implementation 'com.android.support:cardview-v7:27.1.0'
}
/....../

Thank you :)

Seems to work after adding this line to app gradle
implementation 'com.google.firebase:firebase-core:12.0.1'

I have the similar problem, I find the reason is that:
1、app module compile a jar file in build.gradle like this:
compile files('libs/support-v4-23.4.0.jar')
2、library module also compile the same jar file in build.gradle like this:
compile files('libs/support-v4-23.4.0.jar')
3、app module compile library module in build.gradle like this:
compile project(':library')
thus I have reference the same jar file repeatedly

@JayRichrd can you explain why you're using support libraries from a jar rather than including them as an aar dependency?

i have my solution by change this:
implementation 'com.android.support:appcompat-v7:27.0.0'
to
implementation 'com.android.support:appcompat-v7:26.0.0'

@samtstern because I am compling a sdk for customer with support-v4, and the customer only accept to use my sdk via jar rather aar. So i have provided all jar used in my sdk to customer.

I have similar problem cause by updating android studio. None of these solutions worked for me.

I'm running into this since upgrading com.android.tools.build:gradle to 3.1.0. I've managed to fix the issue by downgrading to 3.0.1 in my project's build.gradle:

-        classpath 'com.android.tools.build:gradle:3.1.0'
+        classpath 'com.android.tools.build:gradle:3.0.1'

Update: using the latest Gradle plugin 3.1.2 but adding android.enableD8=false to gradle.properties also fixed the issue for me. Seems that 3.1.0 introduced a new compiler: https://developer.android.com/studio/releases/gradle-plugin

@huse Try.

@lionello
Thank you very much, the "adding android.enableD8=false to gradle.properties" solved the problem.
Android returned:
WARNING: The option 'android.enableD8' is deprecated and should not be used anymore.
but I can move forward. :smiley:

Thanks @lionello and @huse for those pointers!

Having the same error now.

I have the same error after updating the gradle version to 4.4 and android plugin 3.1.2. I can't found the solution for this. Anybody can found how to fix this error?

Code
# > Build.gradle project

`apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.pkg_app.sharing.sharing_app"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
signingConfigs {
debug {
storeFile file(project.projectDir.absolutePath + '/certs/debug.keystore')
storePassword 'changeit'
keyAlias 'android'
keyPassword 'changeit'
}

    release {
        storeFile file(project.projectDir.absolutePath + '/certs/release.jks')
        storePassword 'changeit'
        keyAlias 'android'
        keyPassword 'changeit'
    }
}
buildTypes {
    debug {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        signingConfig signingConfigs.debug
    }

    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        signingConfig signingConfigs.release
    }
}

}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:support-vector-drawable:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-core:15.0.0'
implementation 'com.google.firebase:firebase-database:15.0.0'
implementation 'com.google.firebase:firebase-messaging:15.0.0'
implementation 'com.firebaseui:firebase-ui-database:3.3.0'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.facebook.android:facebook-android-sdk:4.32.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.google.android.gms:play-services-places:15.0.0'
implementation 'com.google.android.gms:play-services-cast:15.0.0'
implementation 'com.google.android.gms:play-services-location:15.0.0'
implementation 'com.google.android.gms:play-services-plus:15.0.0'
implementation 'com.github.clans:fab:1.6.4'
implementation 'com.thomashaertel:multispinner:0.1.1'
implementation('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
transitive = true;
}
// ShowCase View
//implementation 'com.github.mreram:ShowCaseView:1.0.5' // Agregado por Stiwart Antunez 01-05-2018
implementation project(':library')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

// Plugin para login con Gmail Firebase 17-12-206
apply plugin: 'com.google.gms.google-services'`

# > Build.gradle project

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }

    google()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.1.2'
    classpath 'io.fabric.tools:gradle:1.22.1'
    // Dependencia para Firebase - Login Gmail 17-12-2016
    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()

    google()
}

}

task clean(type: Delete) {
delete rootProject.buildDir
}

Thank you!

I was working just fine, and suddenly I got this same error.

Apparently, Firebase had just released a new version 15.0.2 to some of their libraries.
I was using 15.0.0 and updated to the latest and my project worked again.

Hope this helps.

After updating to 15.0.2 I'm getting
Failed to resolve: com.google.android.gms:play-services-auth:15.0.2
...

Thanks for the feedback @qbait, would you mind having a look at this link?

https://firebase.google.com/support/release-notes/android

Apparently, for auth you should use the com.google.firebase:firebase-auth:15.1.0. Would you mind trying it again!?

@heliomartins Hello Helio, I will try that because last night i tried everything XD and doesn't worked nothing.

I will support @heliomartins after i updated my error did disappear. @stwasant Hope it works for you too. Happy coding.

@Madonahs Thank you I hope too.

I was happily developing against 15.0.0 and suddenly a cryptic "Program type already present: com.google.android.gms.internal.measurement.zzwq" interrupts my flow - NOT COOL!

I have updated firebase messaging, storage, core and crash version as 15.0.2.
And this is disappeared.

Thank you @heliomartins ! I was also getting the "Program type already present" error. Following your advice of the Firebase Release Notes pertaining to a release yesterday I upgraded some Firebase libraries and the error went away.

For reference here are the versions I'm using and my app compiles and deploys again.

App Gradle:

implementation 'com.google.firebase:firebase-database:15.0.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-auth:15.1.0'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.firebase:firebase-storage:15.0.2'
implementation 'com.firebaseui:firebase-ui-database:3.3.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'

Project Gradle:

classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.2.1'

If you're having this issue and it just appeared yesterday, please see this SO post for the best answer:
https://stackoverflow.com/questions/50149266/compilation-failed-to-completeprogram-type-already-present-com-google-android

Thank you everybody I upgrade my firebase version and Google services like @fetching and work. :)

Here my last version code:

Final Code

Build Gradle Project

buildscript {
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public'

    }
    google()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.1.2'
    classpath 'io.fabric.tools:gradle:1.22.1'
    // Dependencia para Firebase - Login Gmail 17-12-2016
    classpath 'com.google.gms:google-services:3.2.1'

    classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects {
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
jcenter()
google()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

Build Gradle App

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.pkg_app.sharing.sharing_app"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
signingConfigs {
debug {
storeFile file(project.projectDir.absolutePath + '/certs/debug.keystore')
storePassword 'changeit'
keyAlias 'android'
keyPassword 'changeit'
}

    release {
        storeFile file(project.projectDir.absolutePath + '/certs/release.jks')
        storePassword 'changeit'
        keyAlias 'android'
        keyPassword 'changeit'
    }
}
buildTypes {
    debug {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        signingConfig signingConfigs.debug
    }

    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        signingConfig signingConfigs.release
    }
}
productFlavors {
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
}

}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:support-vector-drawable:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-database:15.0.1'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.firebaseui:firebase-ui-database:3.3.0'
implementation 'com.google.firebase:firebase-auth:15.1.0'
implementation 'com.facebook.android:facebook-android-sdk:4.32.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'
implementation 'com.google.android.gms:play-services-cast:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-plus:15.0.1'
implementation 'com.github.clans:fab:1.6.4'
implementation 'com.thomashaertel:multispinner:0.1.1'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
transitive = true;
}
// ShowCase View
implementation 'com.github.mreram:ShowCaseView:1.0.5' // Agregado por Stiwart Antunez 01-05-2018
implementation project(':library')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

// Plugin para login con Gmail Firebase 17-12-206
apply plugin: 'com.google.gms.google-services'

No Errors but show a Warning "Warning: The rule `-keep public class *extends java.lang.annotation.Annotation {

" and looking now what meen this messages. :)

I found how to fix the warning messages "Warning: The rule `-keep public class *extends java.lang.annotation.Annotation {"

In my Graddle App:
Commented this line:
//multiDexEnabled true

Reference link: https://stackoverflow.com/questions/49518115/android-studio-3-1-warning-the-rule-keep-public-class-extends-java-lang-anno

I updated implementation 'com.google.firebase:firebase-messaging:15.0.0'
to implementation 'com.google.firebase:firebase-messaging:15.0.2'.

So it is worked.!!!

@JayRichrd
I am facing an exactly same issue.
Volley aar in app module
Volley aar in library module

app module uses library module

Were you able to fix it by any chance?

i got this error plz help
Program type already present: android.support.v4.app.LoaderManager |
null |
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: C:\Users\CLA\IGText\app\build\intermediates\transforms\dexBuilder\debug\1.jar,
com.android.tools.r8.CompilationFailedException: Compilation failed to complete |
com.android.tools.r8.utils.AbortException |

I'm having same issue with latest version of core Firebase:
implementation 'com.google.firebase:firebase-core:16.0.5' (on 16.0.4 everything works fine)

No Volley dependency (maybe Glide uses it?)

I agree with @tajchert ... 16.0.4 works perfectly fine... I hope the new update comes with this fix.

Gradle warns that there is a new update for firebase-core:16.0.4 (16.0.5), it's been more than a week already, when you make the change you get the error. The solution as pointed by @tajchert is to revert to 16.0.4 it is strange because if you check the firebase release notes 16.0.5 is not there yet while any other update warn from Gradle about firebase works just fine but core

@hiddeneyes02 what version of Android Studio are you using? Could you try adding the following lines to your gradle.properties file and seeing if anything changes?

android.enableR8 = false
android.enableD8 = false

Warning:The option 'android.enableD8' is deprecated and should not be used anymore.

Was this page helpful?
0 / 5 - 0 ratings