【发布时间】:2014-12-24 14:46:57
【问题描述】:
我是 Android/Java 编程新手,但在 Play 商店中有一个完整的 Android 应用程序。所以我想将 Google Cloud Messaging 添加到我的应用程序中,而那时我遇到了麻烦。各种教程告诉我获取 Google Play 服务 SDK 和 Google 存储库。现在,当我尝试构建时,我得到了 101 个错误,我认为与我的一个或多个 build.gradle 文件有关。我花了几个小时试图解决这个问题。任何帮助将不胜感激!
这是我看到的消息的顶部:
错误:任务 ':lib:processReleaseResources' 执行失败。
com.android.ide.common.internal.LoggedErrorException:无法运行命令: /Applications/Android Studio.app/sdk/build-tools/19.1.0/aapt package -f --no-crunch -I /Applications/Android Studio.app/sdk/platforms/android-19/android.jar -M /Users/scott/Documents/development/Android HVB/lib/build/bundles/release/AndroidManifest.xml -S /Users/scott/Documents/development/Android HVB/lib/build/res/all/release -A /Users /scott/Documents/development/Android HVB/lib/build/bundles/release/assets -m -J /Users/scott/Documents/development/Android HVB/lib/build/source/r/release --non-constant- id --output-text-symbols /Users/scott/Documents/development/Android HVB/lib/build/bundles/release
这里是“app”build.gradle 文件:
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.1'
defaultConfig {
minSdkVersion 10
targetSdkVersion 19
versionCode 14
versionName "1.3a"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:+'
compile 'com.google.android.gms:play-services:6.5.+'
compile project(':lib')
}
【问题讨论】:
-
使用这个编译 'com.google.android.gms:play-services:5.0.89' 代替 6.5.+
-
你解决了吗?