我正在尝试在我的应用中为GCM添加Google Play服务,但无法实现。
com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令'C:\ Program Files \ Java \ jdk1.7.0_79 \ bin \ java.exe''已完成具有非零退出值2
如果我删除编译'com.google.android.gms:play-services-gcm:8.1.0',那么构建就没有问题。我哪里错了?
Build.gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "xxx.yyy.zzz"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
}
dexOptions {
jumboMode true
incremental true
preDexLibraries false
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.code.gson:gson:2.3'
compile 'com.github.bumptech.glide:glide:3.5.2'
compile 'com.google.android:multidex:0.1'
compile 'com.edmodo:cropper:1.0.1'
compile 'com.google.android.gms:play-services-analytics:7.3.0'
compile 'com.loopj.android:android-async-http:1.4.5'
compile 'com.google.android.gms:play-services-gcm:8.1.0'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'com.afollestad:material-dialogs:0.7.4.2'
}