1

When I started to use jack compiler and java 8 to develop an Android app, I found the normal words become garbled like this:

enter image description here

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:

enter image description here

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 ?

L. Swifter
  • 3,179
  • 28
  • 52
  • 2
    I found [this issue](https://code.google.com/p/android/issues/detail?id=215729), which looks similar to what you're describing. – Michael Sep 20 '16 at 13:34
  • you can discard specifying compileOptions in gradle. try once use jack option alone – HourGlass Sep 20 '16 at 13:35
  • @Michael yes, it's the same question. So I think this maybe a bug of Jack compiler. And, even I only use option without `compileOptions`, this question still appears. @HourGlass – L. Swifter Sep 20 '16 at 13:52
  • https://code.google.com/p/android/issues/detail?id=218892 – L. Swifter Sep 20 '16 at 14:17

0 Answers0