When I started to use jack compiler and java 8 to develop an Android app, I found the normal words become garbled like this:
This text should be a Chinese, but it became garbled. And this is my build.gradle
:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.li.test"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
jackOptions {
enabled true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
But when I don't use the jack compiler and java 8, the garbled text returned to normal:
All I have done is deleting the jackOptions
and compileOptions
in the build.gradle
.
My file encoding is UTF-8
.
How can I avoid the garbled text when I use jack and java 8 ? Or is this a bug ?