使用com.google.android.gms构建错误build.gradle:play-services-maps:9.4.0

使用com.google.android.gms构建错误build.gradle:play-services-maps:9.4.0,第1张

概述在我的应用程序中,我有这些依赖项:applyplugin:'com.android.application'android{compileSdkVersion23buildToolsVersion"23.0.2"defaultConfig{applicationId"com.package_app.name"minSdkVersion15t

在我的应用程序中,我有这些依赖项:

apply plugin: 'com.androID.application'androID {    compileSdkVersion 23    buildToolsversion "23.0.2"    defaultConfig {        applicationID "com.package_app.name"        minSdkVersion 15        targetSdkVersion 23        versionCode 1        versionname "1.0"    }    buildTypes {        release {            MinifyEnabled false            proguardfiles getDefaultProguardfile('proguard-androID.txt'), 'proguard-rules.pro'        }    }}dependencIEs {    compile filetree(dir: 'libs', include: ['*.jar'])    testCompile 'junit:junit:4.12'    compile 'com.androID.support:appcompat-v7:23.2.1'    compile 'com.androID.volley:volley:1.0.0'    compile 'com.Google.firebase:firebase-core:9.2.0'    compile 'com.Google.firebase:firebase-messaging:9.2.0'    compile 'de.hdodenhof:circleimagevIEw:2.1.0'    compile 'com.androID.support:design:23.2.1'    compile "com.androID.support:recyclervIEw-v7:23.2.1"    compile 'com.androID.support:cardvIEw-v7:23.2.1'    compile 'com.Google.androID.gms:play-services-maps:9.4.0'}

我放下这些依赖性

apply plugin: 'com.Google.gms.Google-services'

但我无法构建应用程序因为返回此错误.

Error:Execution Failed for task ':app:processDeBUGGoogleServices'.> Please fix the version conflict either by updating the version of the Google-services plugin (information about the latest version is available at https://bintray.com/androID/androID-tools/com.Google.gms.Google-services/) or updating the version of com.Google.androID.gms to 9.2.0.

所以我试着把

compile 'com.Google.androID.gms:play-services-maps:9.2.0'

应用程序构建,所以我的问题是:
为什么我不能使用最新版本的services-map?

解决方法:

我昨天遇到了同样的问题并通过以下方式解决了这个问题:

首先,确保您的项目/顶级gradle文件具有依赖项内的谷歌服务的最新版本

classpath 'com.Google.gms:Google-services:3.0.0'

其次,请确保将插件放在gradle app文件的底部

apply plugin: 'com.Google.gms.Google-services'

并确保包括firebase在内的所有谷歌服务依赖项都是相同的版本,即9.4.0

compile 'com.Google.androID.gms:play-services:9.4.0'compile 'com.Google.androID.gms:play-services-auth:9.4.0'compile 'com.Google.androID.gms:play-services-gcm:9.4.0'compile 'com.Google.firebase:firebase-core:9.4.0'compile 'com.Google.firebase:firebase-auth:9.4.0'

这是我目前在app.gradle依赖项中的内容.

总结

以上是内存溢出为你收集整理的使用com.google.android.gms构建错误build.gradle:play-services-maps:9.4.0全部内容,希望文章能够帮你解决使用com.google.android.gms构建错误build.gradle:play-services-maps:9.4.0所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1108406.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存