如题:我new了一个线程,在run函数里面创建一个AlertDialog,报了这个错
java.lang.RuntimeException: Can't create headler inside thread that has not called Looper.prepare().
这是什么意思啊?求大神解答。AlertDialog线程thread
java.lang.RuntimeException: Can't create headler inside thread that has not called Looper.prepare().
这是什么意思啊?求大神解答。AlertDialog线程thread
解决方案 »
- 如何在自定义的View创建ImageButton
- 关于一个MediaStore的一个小问题.
- 求救一个tab中放两个activity
- 请问mount命令挂载img的操作?
- 新手_运行问题
- 空指针异常,但是却没指出我代码错在哪行,帮看下 log!
- 求高手帮助,关于视频文件得到视频帧数据问题
- android mediaplayer对rmvb等格式如何解码
- 将原始xml内容显示在TextView中出错
- android写在工程里的测试类在应用签名时会被打包吗?(急!急!急)
- 急!急!急!求大神们指点如果在android平台下开启jbox2d的debugDraw功能
- SimpleAdapter添加了两个元素怎么都不显示内容?求大神帮忙
Looper.prepare();
1 在主线程中 new 一个 handler,
2 在子线程中将数据发送 postMessage 或 sendMessage 到上 handler 中,在那里再显示 alertdialog.