代码中是好的,但是运行时会乱码

 

解决方法,file->setting->editor->file encoding 将project encoding改成utf-8

 

记得重启Android studio!!!然后代码中会乱码,把乱码删掉,重新输入中文,运行后乱码消失: