我正在尝试按照本文https://developer.android.com/preview/j8-jack.html中的步骤启用Android项目中的Jack工具链,但我一添加
android {
defaultConfig {
jackOptions {
enabled true
}
}
}
并运行gradle clean,我立即收到此错误:
Cannot test obfuscated variants when compiling with jack
我在一个非常简单的Android项目中进行了尝试,但仍然遇到相同的错误.这是一个示例gradle.build文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 7
targetSdkVersion 23
versionCode 1
versionName "1.0"
jackOptions {
enabled true
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
}