找到了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

查看:268
本文介绍了找到了com.google.android.gms:play-services-places:9.2.1,但google-services插件需要9.0.2版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标题是我正在尝试编译我的Android应用程序的错误。
这看起来像是一个反复出现的问题,但同类问题的答案都没有帮助我。



我在我的项目构建中.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'c​​om.android.support:appcompat-v7:24.1.1'
compile'c​​om.android .support:support-v4:24.1.1'
compile'c​​om.android.support:support-v13:24.1.1'
compile'c​​om.android.support:cardview-v7:24.1.1 '
compile'net.hockeyapp.android:HockeySDK:4.0.0'
compile'c​​om.google.firebase:firebase-core:9.0.2'
compile'c​​om.google.firebase :火力点,databa se:9.0.2'
compile'c​​om.google.firebase:firebase-auth:9.0.2'
compile'c​​om.android.support:design:24.1.1'
compile' com.android.volley:volley:1.0.0'
compile'c​​om.squareup.picasso:picasso:2.5.2'
compile'c​​om.amazonaws:aws-android-sdk-cognito:2.2。 21'
compile'c​​om.amazonaws:aws-android-sdk-s3:2.2.21'
compile'c​​om.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'c​​om.goo gle.firebase:firebase-core:9.0.2'
compile'c​​om.google.firebase:firebase-database:9.0.2'
compile'c​​om.google.firebase:firebase-auth:9.0。 2'

我将其更改为:

  compile'c​​om.google.firebase:firebase-core:9.2.1'
compile'c​​om.google.firebase:firebase-database:9.2.1'
编译'com.google.firebase:firebase-auth:9.2.1'

现在可以运行与

  compile'c​​om.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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆