Bak*_*123 40 android google-play-services android-studio android-gradle-plugin
我刚刚在Android SDK Manager中将Google Play服务更新到最新版本 - 23.接下来,我将项目中的依赖项更新为:
com.google.android.gms:play-services-gcm:8.3.0
但我得到了:
Found com.google.android.gms:play-services-gcm:8.3.0, but version 8.1.0 is needed
Found com.google.android.gms:play-services-gcm:8.3.0, but version 8.1.0 is needed
Found com.google.android.gms:play-services-gcm:8.3.0, but version 8.1.0 is needed
Found com.google.android.gms:play-services-gcm:8.3.0, but version 8.1.0 is needed
Found com.google.android.gms:play-services-gcm:8.3.0, but version 8.1.0 is needed
:app:processDebugGoogleServices FAILED
Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict.
Run Code Online (Sandbox Code Playgroud)
怎么了?你有这个问题吗?
Jef*_*ton 74
在顶级build.gradle文件中,您需要更新要使用的依赖项
classpath 'com.google.gms:google-services:1.5.0-beta2'
Run Code Online (Sandbox Code Playgroud)
额外信息:通过查看JFrog Bintray上的条目可以找到最新版本
进一步更新:是的,自从我回答问题后,这已经更新.最新版本是:
classpath 'com.google.gms:google-services:3.0.0'
Run Code Online (Sandbox Code Playgroud)
但是,始终值得按照提供的链接查找最新版本.
mtr*_*kal 26
8.4.0的工作解决方案(对于以前的版本也可能与此疯狂问题相同)
project build.gradle:
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:2.1.2'
}
Run Code Online (Sandbox Code Playgroud)
app/mobile build.gradle
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'android-apt'
android {
...
...
...
}
dependencies {
// Google Play Services
compile 'com.google.android.gms:play-services-analytics:8.4.0'
// another play services in v8.4.0
}
apply plugin: 'com.google.gms.google-services' // why here on end? Because GOOGLE...
Run Code Online (Sandbox Code Playgroud)
警告:
当您apply plugin: 'com.google.gms.google-services'
在构建gradle上移动时,它无法编译...
归档时间: |
|
查看次数: |
29406 次 |
最近记录: |