接android游戏sdk中,经常会遇到Looper报错,此时需要在主线程中调用sdk函数。
将sdk的函数放到UI线程中执行。
如:
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
}
});
(android)Can't Create handler inside thread that has not called Looper.prepare()
时间: 2024-11-03 22:11:34