Android google play服务冲突错误

Android google play服务冲突错误,android,android-gradle-plugin,google-play-services,Android,Android Gradle Plugin,Google Play Services,在我的一个项目中,谷歌播放服务出错。 下面是我的gradle文件和获取错误- 错误:任务“:app:processDebugGoogleServices”的执行失败。 请通过更新google services插件的版本(有关最新版本的信息,请访问)或将com.google.android.gms的版本更新为9.0.2来修复版本冲突 如何解决上述问题。请建议我尝试更新您的播放服务位置 制作相同版本的Firebase或Google Play服务 使用这个 compile('com.google.an

在我的一个项目中,谷歌播放服务出错。 下面是我的gradle文件和获取错误-

错误:任务“:app:processDebugGoogleServices”的执行失败。 请通过更新google services插件的版本(有关最新版本的信息,请访问)或将com.google.android.gms的版本更新为9.0.2来修复版本冲突


如何解决上述问题。请建议我

尝试更新您的播放服务位置

制作相同版本的Firebase或Google Play服务

使用这个

compile('com.google.android.gms:play-services-location:11.0.2')
compile('com.google.android.gms:play-services-location:9.0.2') {
   force = true;
}
而不是这个

compile('com.google.android.gms:play-services-location:11.0.2')
compile('com.google.android.gms:play-services-location:9.0.2') {
   force = true;
}

compile('com.google.android.gms:play services location:9.0.2')
更改为版本
11.0.2

只需更改您的密码,您应该添加相同版本的google play services

compile('com.google.android.gms:play-services-location:9.0.2')
{
.....
}


您需要使用相同版本的Firebase/Google Play服务。您正在使用以下命令:

compile('com.google.android.gms:play-services-location:9.0.2') {
   force = true;
}

compile 'com.google.android.gms:play-services-base:11.0.2'
compile 'com.google.android.gms:play-services-basement:11.0.2'
compile 'com.google.android.gms:play-services-safetynet:11.0.2'
compile 'com.google.android.gms:play-services-tasks:11.0.2'
这是一个不同的版本。将其更改为与
11.0.2
相同的版本。然后删除
force=true
,因为您可能不需要它:

compile 'com.google.android.gms:play-services-location:9.0.2'