Getting the error “duplicate entry: com/google/android/gms/internal/zzble.class” when trying to add a package

前端 未结 6 1107
囚心锁ツ
囚心锁ツ 2020-12-16 13:31

I\'m trying to add the react-native-firestack package to my app. But it keeps giving the following error :

:app:mergeDebugResources UP-TO-DATE
:         


        
6条回答
  •  北荒
    北荒 (楼主)
    2020-12-16 13:50

    I got this error today when my dependencies were the following:

    compile 'com.google.firebase:firebase-auth:10.2.0'
    compile 'com.google.android.gms:play-services-auth:10.2.0'
    compile 'com.android.support:appcompat-v7:25.2.0'
    compile 'com.android.support:design:25.2.0'
    compile 'com.google.firebase:firebase-database:10.0.1'
    

    But it went away when I changed the last dependency to the following:

    compile 'com.google.firebase:firebase-auth:10.2.0'
    compile 'com.google.android.gms:play-services-auth:10.2.0'
    compile 'com.android.support:appcompat-v7:25.2.0'
    compile 'com.android.support:design:25.2.0'
    compile 'com.google.firebase:firebase-database:10.2.0'
    

    So make sure you use dependencies with same versions. That is the support libraries should have same version, and same goes for Firebase and Google Play dependencies.

提交回复
热议问题