【发布时间】:2016-07-29 08:24:24
【问题描述】:
标题是我在尝试编译我的 Android 应用程序时遇到的错误。 这看起来像是一个反复出现的问题,但同类问题的答案都没有帮助我。
我在项目的 build.gradle 中有这个
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
}
这在我的应用程序的 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'
当我尝试用 com.google.android.gms:play-services-places:9.0.2 替换 com.google.android.gms:play-services-places:9.2.1 时,我收到以下编译错误:
Error:(38, 13) Failed to resolve: com.google.android.gms:play-services-places:9.0.2
有什么想法吗?
【问题讨论】:
-
你是否尝试刷新依赖项
gradle build --refresh-dependencies...或构建-->清理项目 -
在你的 .idea,libraries 文件夹中你的版本是什么意思??
-
我在其他文件中看到了这个文件:play_services_places_9_2_1.xml。
-
这是我尝试过的......我删除了那个 xml 并同步了我的 gradle 文件。它被重新创建了......你可以试一试吗
-
感谢您的建议,但这是 play-services-places 和 firebase 之间的版本差异,请参阅我的回答。谢谢
标签: android google-play-services