Android Studio all gms/firebase libaries must use

2020-06-17 06:13发布

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?

3条回答
乱世女痞
2楼-- · 2020-06-17 06:49

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'
查看更多
做个烂人
3楼-- · 2020-06-17 07:00

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

查看更多
老娘就宠你
4楼-- · 2020-06-17 07:03

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

查看更多
登录 后发表回答