一、运行编译
1.build failed 且build output出现中文乱码
报错:
解决方法:
双击shift,在里面输入如下Edit Custom VM Option,并且点击第一个。提示没有文件的话就create一个。
然后在里面输入-Dfile.encoding=UTF-8
重启android,不行再重启电脑。
二、代码
1.问题描述
Toast无法显示:Can't toast on a thread that has not called Looper.prepare()
public void start(){ new Thread(new Runnable() { @Override public void run() { String text="1111"; Toast.makeText(InfoChangeActivity.this,"修改成功",Toast.LENGTH_LONG).show(); } }).start();