我們編碼的時候最好一致改編碼方式爲UTF-8。
工程亂碼 + UI亂碼
控制檯亂碼
//解決中文亂碼
//舊版
/*tasks.withType(Compile) {
options.encoding = "UTF-8"
}*/
//新版 2.0+
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
【歡迎上碼】
【微信公衆號搜索 h2o2s2】
我們編碼的時候最好一致改編碼方式爲UTF-8。
//解決中文亂碼
//舊版
/*tasks.withType(Compile) {
options.encoding = "UTF-8"
}*/
//新版 2.0+
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
【歡迎上碼】
【微信公衆號搜索 h2o2s2】