-1

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.

  • okay did u update the version, as said in the error? – Peter Haddad Feb 02 '18 at 06:51
  • 1
    Please update the same version of play services vision library which is 'com.google.android.gms:play-services-vision:11.0.4' in your gradle. – Debdeep Feb 02 '18 at 06:52
  • it asks me to install Repository and when i download them, it appear an error "Couldn't find dependency com.google.android.gms:google-services:11.0.4" –  Feb 02 '18 at 06:56

3 Answers3

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'
Vivek Patel
  • 399
  • 4
  • 18
0

Try this

 implementation 'com.google.firebase:firebase-database:11.0.4'
 implementation 'com.google.android.gms:play-services-vision:11.0.4'
AskNilesh
  • 67,701
  • 16
  • 123
  • 163
0

Add this:

 implementation 'com.google.firebase:firebase-database:9.0.0'
 compile 'com.google.firebase:firebase-database:9.0.0'
Eby Cloudins
  • 111
  • 8