0
我正在嘗試爲Android構建Android物理Web項目。我收到以下錯誤物理Web Android項目執行失敗的任務':app:dexRelease'
任務':app:dexRelease'的執行失敗。
com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:進程 '命令' C:\ Program Files文件\的Java \ jdk1.8.0_65 \斌\ java.exe的「非零退出值1
在堆棧跟蹤,這是我的堆棧
at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalE
xitValue(GradleProcessResult.java:42)
at com.android.builder.core.AndroidBuilder.convertByteCode(AndroidBuilder.java
:1276)
at com.android.builder.core.AndroidBuilder$convertByteCode$2.call(Unknown Sour
ce)
at com.android.build.gradle.tasks.Dex.doTaskAction(Dex.groovy:165)
at com.android.build.gradle.tasks.Dex.this$6$doTaskAction(Dex.groovy)
at com.android.build.gradle.tasks.Dex$this$6$doTaskAction.callCurrent(Unknown
Source)
at com.android.build.gradle.tasks.Dex.taskAction(Dex.groovy:99)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
... 53 more
Caused by: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_65\bin\java.exe'' finished with non-zero exit value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalEx
itValue(DefaultExecHandle.java:365)
at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalE
xitValue(GradleProcessResult.java:40)
... 60 more
這是我的build.gradle完成
apply plugin: 'com.android.application'
apply plugin: 'checkstyle'
apply plugin: 'findbugs'
apply plugin: 'pmd'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "physical_web.org.physicalweb"
minSdkVersion 19
targetSdkVersion 23
versionCode 15
versionName "0.1.856"
// Enabling multidex support.
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
if(new File("signing.properties").exists()) {
Properties signingProperties = new Properties()
signingProperties.load(new FileInputStream(new File('signing.properties')))
signingConfigs {
release {
storeFile new File(signingProperties['storeFile'])
storePassword signingProperties['storePassword']
keyAlias signingProperties['keyAlias']
keyPassword signingProperties['keyPassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
lintOptions {
// We'll get to fixing the icon later
disable 'IconLauncherShape', 'IconDensities', 'IconMissingDensityFolder'
// Travis requires an older api at the moment
disable 'OldTargetApi'
}
}
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compile(project(':libs')) {
exclude group: 'org.json', module: 'json'
}
compile 'com.android.volley:[email protected]'
compile 'org.uribeacon:[email protected]'
compile 'com.android.support:appcompat-v7:23.0.1'
}
task checkstyle(type: Checkstyle) {
configProperties.checkstyleSuppressionsPath = new File(rootDir, "app/config/checkstyle/suppressions.xml").absolutePath
source 'src'
include '**/*.java'
exclude '**/gen/**'
classpath = files()
}
task findbugs(type: FindBugs, dependsOn: assembleDebug) {
ignoreFailures = false
effort = "max"
reportLevel = "high"
classes = files("${project.rootDir}/app/build/intermediates/classes")
excludeFilter = file("${project.rootDir}/app/config/findbugs/exclude-filter.xml")
source 'src'
include '**/*.java'
exclude '**/gen/**'
reports {
xml.enabled = false
html.enabled = true
xml {
destination "$project.buildDir/reports/findbugs/findbugs.xml"
}
html {
destination "$project.buildDir/reports/findbugs/findbugs.html"
}
}
classpath = files()
}
task pmd(type: Pmd, dependsOn: assembleDebug) {
ignoreFailures = false
ruleSetFiles = files("${project.rootDir}/app/config/pmd/pmd-ruleset.xml")
ruleSets = []
source 'src'
include '**/*.java'
exclude '**/gen/**'
reports {
xml.enabled = false
html.enabled = true
xml {
destination "$project.buildDir/reports/pmd/pmd.xml"
}
html {
destination "$project.buildDir/reports/pmd/pmd.html"
}
}
}
check.dependsOn 'checkstyle', 'findbugs', 'lint', 'pmd'