【发布时间】:2016-04-18 20:12:41
【问题描述】:
如果我尝试在 Top - level build.gradle 文件中添加依赖项,则会出现以下错误。这个依赖对于在项目中添加 GCM 非常有用,没有它 GCM 将无法工作:
依赖:
classpath 'com.google.gms:google-services:1.5.0-beta2'
错误:-
Error:Execution failed for task ':app:mergeDebugResources'.
> Some file crunching failed, see logs for details
如果我从顶级 build.gradle 中删除该依赖项,则项目编译并成功运行。
如果我添加该文件,我会收到错误,Android Studio 不会运行项目。
请帮助我摆脱这个错误。
编辑 这是我的项目级 build.gradle 文件:-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
// classpath 'com.android.tools.build:gradle:2.0.0-alpha6'
classpath 'com.android.tools.build:gradle:2.0.0-beta5'
classpath 'com.google.gms:google-services:2.0.0-beta5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
【问题讨论】:
标签: android google-cloud-messaging