我的错误
任务执行失败':dexRelease'。 com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令' C:\ Program Files \ Java \ jdk1.7.0_79 \ bin \ java.exe& #39;'完成非零退出值2
这是我的build.gradle 如果你解决这个问题会有所帮助。
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
apply plugin: 'com.android.application'
repositories {
mavenCentral()
maven {
url "https://repository-achartengine.forge.cloudbees.com/snapshot/"
}
}
dependencies {
compile('com.google.api-client:google-api-client:1.19.0') {
exclude group: 'org.apache.httpcomponents'
exclude group: 'xpp3'
exclude group: 'junit'
exclude group: 'com.google.android'
}
compile 'com.android.support:support-v4:23.2.0'
compile 'org.achartengine:achartengine:1.1.0'
compile 'ch.acra:acra:4.6.1'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'org.apache.commons:commons-lang3:3.1'
compile 'com.google.api-client:google-api-client-android:1.19.0'
compile 'com.google.api-client:google-api-client-gson:1.19.0'
compile 'com.google.apis:google-api-services-adsense:v1.4-rev29-1.19.0'
compile 'com.google.code.gson:gson:2.1'
compile 'net.sf.opencsv:opencsv:2.3'
compile 'com.google.code.findbugs:jsr305:1.3.9'
compile 'com.google.android.gms:play-services-ads:8.3.0'
compile 'com.google.android.gms:play-services-identity:8.3.0'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
}
android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
// lintOptions {
// checkReleaseBuilds false
// abortOnError false
// }
signingConfigs {
release {
storeFile file("andlytics-release-key.keystore")
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build- types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
if (project.hasProperty('storePassword')
&& project.hasProperty('keyAlias')
&& project.hasProperty('keyPassword')) {
android.signingConfigs.release.storePassword = storePassword
android.signingConfigs.release.keyAlias = keyAlias
android.signingConfigs.release.keyPassword = keyPassword
}