Search code examples
androidgradlegoogle-signinconflictvonage

Conflict between nexmo and google sign in


My app level build.gradle has the following dependencies:

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'


    compile 'com.android.support:design:26.1.0'     
    compile 'com.squareup.retrofit2:retrofit:2.3.0'        
    compile 'com.squareup.retrofit2:converter-gson:2.3.0'       
    implementation 'com.facebook.android:facebook-login:4.30.0'       
    compile 'com.squareup.picasso:picasso:2.5.2'     
    compile 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
    compile 'com.google.android.gms:play-services-auth:11.8.0'
    compile 'de.hdodenhof:circleimageview:2.2.0'
    compile 'com.nexmo:verify:4.0.0'
}

The problem I am having is that the Application crashes once I run it. Now I understand why it's crashing, its because I have that red curly line in compile 'com.google.android.gms:play-services-auth:11.8.0'which says something like all gms/firebase must use the same exact version . I ran ./gradlew app:dependencies. I think what caused the problem is nexmo is using google firebase messaging 9.8.0 and we have that sign in from google which is 11.8.0. So I commented the Nexmo dependency and sure enough the red curly line in google auth dependency is gone. But I need the nexmo verify. I also tried changing the google auth dependency version to 9.8.0 to see if that works, but it seems that all the classes for Google Sign in are not available.


Solution

  • The nexmo library seems to use very old dependencies (last commit was 1 year ago)

    Add in your build.gradle

    compile 'com.google.firebase:firebase-messaging:11.8.0'