6

This is my Gradle:app file

two muppets

Error I get when I try to rebuild: "All gms/firebase libaries must use the exact same version specification. Found versions 11.6.0, 10.2.0. Examples include com.google.android.gms:play-services-auth:11.6.0 and com.google.android.gms:play-services-location:10.2.0"

Anyone know how to get rid of the error?

kac26
  • 381
  • 1
  • 7
  • 25
  • On top of that all your *support* libraries must use the same version. Better clean this up, `design` support library is mentioned twice. – Eugen Pechanec Nov 20 '17 at 17:46

3 Answers3

2

I also had same error for the dependency version:

compile com.google.firebase:firebase-core:11.6.2'

I resolved it by adding this missing dependency:

compile 'com.google.android.gms:play-services:11.6.2'
Karan Khara
  • 100
  • 5
1

Run ./gradlew app:dependencies to see what your transitive dependencies are (this will show what lib is depending on 10.2.0 for example)

John O'Reilly
  • 10,000
  • 4
  • 41
  • 63
  • It was 'com.frosquivel:magicalcamera:5.0.3', but I need that camera. Is there any way I can use Magical camera and also Google play services? – kac26 Nov 20 '17 at 18:11
  • @kac26 Try including the dependency for location with the newer version manually, as suggested by Rainmaker: `compile "com.google.android.gms:play-services-location:11.6.0"`. It should "override" the transitive dependency. – aksh1618 Nov 20 '17 at 18:26
  • @A.K.S.H I tried but i get the same error. Nothing changes. – kac26 Nov 20 '17 at 18:28
  • @kac26 In that case try excluding the transitive dependency: `compile('com.frosquivel:magicalcamera:5.0.3') { exclude 'com.google.android.gms:play-services-location' }` – aksh1618 Nov 20 '17 at 18:32
  • @A.K.S.H in that case i got error "gradle dsl method not found 'exclude()'", but if I change the dependency to: compile('com.frosquivel:magicalcamera:5.0.3') { exclude(group: 'com.google.android.gms', module: 'play-services-location') }, I get the same same error as on the beginning: "All gms/firebase libaries must use the exact same version specification..." – kac26 Nov 20 '17 at 18:48
  • 1
    @A.K.S.H I solved it! I change the compile to compile('com.frosquivel:magicalcamera:5.0.3') { exclude(group: 'com.google.android.gms') } and it started working! Thanks! – kac26 Nov 20 '17 at 18:56
0

I can see you add com.google.android.gms:play-services-auth:11.6.0 dependency in your gradle but not com.google.android.gms:play-services-location .Try adding compile "com.google.android.gms:play-services-location:11.6.0" to your dependencies, sync and rebuild the porject and also clean up the mess with other dependencies

Rainmaker
  • 10,294
  • 9
  • 54
  • 89