安卓AndroidStdio控制臺亂碼解決
情況:
在AndroidStudio中新建了一個Java Module,但是點擊 Run ‘a(chǎn)pp’之后,Build Output 控制臺輸出的中文都是亂碼,都是問號一樣的字符
第一個解決方案
File Encodings 改為UTF-8?
沒用!
第二個解決方案
build.gradle 添加如下代碼?
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
正確解決辦法
雙擊Shift,輸入vmoption,,選擇Edit Custom CM Options
如果之前沒有配置過,會彈出窗口問是否創(chuàng)建配置文件,點擊Create
輸入文章來源:http://www.zghlxwxcb.cn/news/detail-828041.html
-Dfile.encoding=UTF-8
保存,重啟就可以了!文章來源地址http://www.zghlxwxcb.cn/news/detail-828041.html
到了這里,關(guān)于安卓AndroidStdio控制臺亂碼解決的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!