2

Following this guide, I'm trying to implement notifications through firebase.

I have followed the guide, updated build.gradle:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.facebook.android:facebook-android-sdk:[4,5)'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:25.3.1'
    compile 'com.google.firebase:firebase-crash:9.0.0'
    compile 'com.google.firebase:firebase-core:9.0.0'
    compile 'com.google.firebase:firebase-messaging:9.0.0'
    compile 'com.google.android.gms:play-services-auth:9.0.0'
    testCompile 'junit:junit:4.12'
    compile('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
        transitive = true;
    }
}
apply plugin: 'com.google.gms.google-services'

However when testing i get the error:

E/DynamiteModule: Failed to load module descriptor class: Didn't find class "com.google.android.gms.dynamite.descriptors.com.google.firebase.auth.ModuleDescriptor"

E/FirebaseApp: Firebase API initialization failure.

I have looked at other questions relating to this issue, but there has been no useful solution.

I have also tried modifying dependency version to the latest 11.4.2, only to see the following error:

Error:Execution failed for task ':app:processDebugGoogleServices'.

Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.0.0.

Commenting out all dependencies except firebase/play-services, does not resolve the above

JPJens
  • 1,185
  • 1
  • 17
  • 39
  • 1
    Possible duplicate of [Failed to load module descriptor class: Didn't find class "com.google.android.gms.dynamite.descriptors.com.google.firebase.auth.ModuleDescriptor"](https://stackoverflow.com/questions/37370258/failed-to-load-module-descriptor-class-didnt-find-class-com-google-android-gm) – Sushin Pv Oct 25 '17 at 10:57

1 Answers1

0

A simple solution is that use Fireabase Assistant to initialize the Firebase in your application

First remove all firebase dependency and apply plugin: 'com.google.gms.google-services' from your app gradle ( in Android Studio 2.3.3) follow this step

Tools > Firebase
(On right tab) Assistant > Authentication
Sushin Pv
  • 1,826
  • 3
  • 22
  • 36