Java IntelliJ IDEA - error unmappable character for encoding MS950

Java IntelliJ IDEA - error unmappable character for encoding MS950 

我在使用gradle 編譯時,發生了

error unmappable character for encoding MS950 

後,找到,只要在grade 加入以下編譯設定就可以編譯成功


tasks.withType(JavaCompile) {
    options.encoding = "UTF-8"
}