【发布时间】:2015-08-25 19:39:39
【问题描述】:
我正在尝试按照本网站上的步骤在 Android Studio 中实现 GCM 客户端: Implementing GCM Client on Android
正如“设置 Google Play 服务”中所述,我编辑了我的应用程序的 build.gradle 文件,使其看起来像这样:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 20
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.buuurn.gymio"
minSdkVersion 16
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:23.0.0'
compile 'com.google.android.gms:play-services:7.+'
}
如果我现在同步 gradle,我会收到以下错误消息:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Applications/adt-bundle 23/sdk/build-tools/23.0.0/aapt'' finished with non-zero exit value 1
我已经尝试过改变
compile 'com.google.android.gms:play-services:7.+'
到即
compile 'com.google.android.gms:play-services:7.8.0'
但发生了同样的错误。
我还阅读了一些关于添加 google 服务时出现 gradle 错误的帖子,但没有任何帮助。
谢谢!
【问题讨论】:
-
构建工具版本是
23而不是23.0.0并且它在单引号中'23'
标签: android android-studio gradle google-cloud-messaging