找到了com.google.android.gms:play-services-places:9.2.1,但google-services插件需要9.0.2版本 [英] Found com.google.android.gms:play-services-places:9.2.1, but version 9.0.2 is needed for the google-services plugin
问题描述
这看起来像是一个反复出现的问题,但同类问题的答案都没有帮助我。
我在我的项目构建中.gradle
依赖关系{
classpath'com.android.tools.build:gradle:2.1.2'
classpath'com.google.gms:google-services:3.0.0'
}
在我的应用程序的build.gradle中,这个
依赖关系{
编译fileTree(dir:'libs',include :['* .jar'])
testCompile'junit:junit:4.12'
compile'com.android.support:appcompat-v7:24.1.1'
compile'com.android .support:support-v4:24.1.1'
compile'com.android.support:support-v13:24.1.1'
compile'com.android.support:cardview-v7:24.1.1 '
compile'net.hockeyapp.android:HockeySDK:4.0.0'
compile'com.google.firebase:firebase-core:9.0.2'
compile'com.google.firebase :火力点,databa se:9.0.2'
compile'com.google.firebase:firebase-auth:9.0.2'
compile'com.android.support:design:24.1.1'
compile' com.android.volley:volley:1.0.0'
compile'com.squareup.picasso:picasso:2.5.2'
compile'com.amazonaws:aws-android-sdk-cognito:2.2。 21'
compile'com.amazonaws:aws-android-sdk-s3:2.2.21'
compile'com.google.android.gms:play-services-places:9.2.1'
apply plugin:'com.google.gms.google-services'
当我尝试使用com.google.android.gms:play-services-places:9.0.2替换com.google.android.gms:play-services-places:9.2.1时,出现此编译错误:
错误:(38,13)无法解析:com.google.android.gms:play-services-places: 9.0.2
有什么想法?
好的,问题出在这里:
compile'com.goo gle.firebase:firebase-core:9.0.2'
compile'com.google.firebase:firebase-database:9.0.2'
compile'com.google.firebase:firebase-auth:9.0。 2'
我将其更改为:
compile'com.google.firebase:firebase-core:9.2.1'
compile'com.google.firebase:firebase-database:9.2.1'
编译'com.google.firebase:firebase-auth:9.2.1'
现在可以运行与
compile'com.google.android.gms:play-services-places:9.2.1'
The title is the error I'm getting trying to compile my Android app. This looks like a recurring problem, but none of the answers for the questions of the same kind helped me.
I've got this in my project's build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
}
And this in my app's build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.1.1'
compile 'com.android.support:support-v4:24.1.1'
compile 'com.android.support:support-v13:24.1.1'
compile 'com.android.support:cardview-v7:24.1.1'
compile 'net.hockeyapp.android:HockeySDK:4.0.0'
compile 'com.google.firebase:firebase-core:9.0.2'
compile 'com.google.firebase:firebase-database:9.0.2'
compile 'com.google.firebase:firebase-auth:9.0.2'
compile 'com.android.support:design:24.1.1'
compile 'com.android.volley:volley:1.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.amazonaws:aws-android-sdk-cognito:2.2.21'
compile 'com.amazonaws:aws-android-sdk-s3:2.2.21'
compile 'com.google.android.gms:play-services-places:9.2.1'
}
apply plugin: 'com.google.gms.google-services'
When I try replacing com.google.android.gms:play-services-places:9.2.1 with com.google.android.gms:play-services-places:9.0.2, then I get this compile error:
Error:(38, 13) Failed to resolve: com.google.android.gms:play-services-places:9.0.2
Any idea?
OK, the problem was coming from this:
compile 'com.google.firebase:firebase-core:9.0.2'
compile 'com.google.firebase:firebase-database:9.0.2'
compile 'com.google.firebase:firebase-auth:9.0.2'
I changed it to this:
compile 'com.google.firebase:firebase-core:9.2.1'
compile 'com.google.firebase:firebase-database:9.2.1'
compile 'com.google.firebase:firebase-auth:9.2.1'
And now it works in unison with
compile 'com.google.android.gms:play-services-places:9.2.1'
这篇关于找到了com.google.android.gms:play-services-places:9.2.1,但google-services插件需要9.0.2版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!