1.java.lang.RuntimeException: Can't toast on a thread that has not called Looper.prepare()
解决方法:
在子线程中添加这几行代码
//解决在子线程中调用Toast的异常情况处理 Looper.prepare(); Toast.makeText(context, str, Toast.LENGTH_SHORT).show(); Looper.loop();
1.java.lang.RuntimeException: Can't toast on a thread that has not called Looper.prepare()
解决方法:
在子线程中添加这几行代码
//解决在子线程中调用Toast的异常情况处理 Looper.prepare(); Toast.makeText(context, str, Toast.LENGTH_SHORT).show(); Looper.loop();