完整错误如下:
错误:任务':app:transformJackWithJackForDebug'。>执行失败。 启动进程'命令C:\ Program时出现问题 Files \ Android \ Android Studio \ jre \ bin \ java.exe''
人们似乎对java有问题并且以非零退出值结束......',但我找不到上述问题的任何答案。
我在Android Studio v2.3.1上进行Gradle构建 Gradle版本 - 3.3
我的build.gradle文件是这样的:
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
...
minSdkVersion 15
targetSdkVersion 25
...
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
jackOptions {
enabled true
jackInProcess false
}
dexOptions {
javaMaxHeapSize "2048M"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/INDEX'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/INDEX.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/index.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
...
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:gridlayout-v7:25.3.1'
compile files('libs/mypackage-super.jar')
}
任何帮助都将不胜感激。