Firebase dependency conflict Found 'com.google.firebase:firebase-database:11.0.4', with 'com.google.android.gms:play-services-vision:9.4.0'

南笙酒味 提交于 2019-12-25 18:40:11

问题


my application include QR Scanner and Generator but when i add 'com.google.android.gms:play-services-vision:9.4.0' library it conflect with 'com.google.firebase:firebase-database:11.0.4' library

here my Gradle dependences

plus it shows me an 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.8.0.


回答1:


Always try to use same version of APIs when you are dealing with google APIs:

If you are using Android Studio 3.0 you can use both compile and implementation

implementation 'com.google.firebase:firebase-database:11.0.4'
implementation 'com.google.android.gms:play-services-vision:11.0.4'

If you are using Android Studio version below 3.0 use compile

 compile 'com.google.firebase:firebase-database:11.0.4'
 compile 'com.google.android.gms:play-services-vision:11.0.4'



回答2:


Try this

 implementation 'com.google.firebase:firebase-database:11.0.4'
 implementation 'com.google.android.gms:play-services-vision:11.0.4'



回答3:


Add this:

 implementation 'com.google.firebase:firebase-database:9.0.0'
 compile 'com.google.firebase:firebase-database:9.0.0'


来源:https://stackoverflow.com/questions/48577179/firebase-dependency-conflict-found-com-google-firebasefirebase-database11-0-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!