问题
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