I'm trying to enable the Jack toolchain in my Android project by following the steps in this article https://developer.android.com/preview/j8-jack.html but as soon as I add
android {
defaultConfig {
jackOptions {
enabled true
}
}
}
and run gradle clean
, I get this error right away:
Cannot test obfuscated variants when compiling with jack
I tried it with a very simple Android project and I still get the same error. This is a sample gradle.build file:
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'
}