本月博客排行
-
第1名
e_e -
第2名
yeluowuhen
年度博客排行
-
第1名
龙儿筝 -
第2名
宏天软件 -
第3名
benladeng5225 - kaizi1992
- wy_19921005
- vipbooks
- arpenker
- e_e
- wallimn
- ganxueyun
- Xeden
- zhanjia
- johnsmith9th
- zxq_2017
- forestqqqq
- jbosscn
- daizj
- jh108020
- xpenxpen
- fantaxy025025
- zysnba
- 喧嚣求静
- kristy_yy
- javashop
- yeluowuhen
- sunj
- ajinn
- lerf
- lemonhandsome
- chenqisdfx
- flashsing123
- xiaoxinye
- lyndon.lin
- bosschen
- zhangjijun
- sunnylocus
- lyj86
- duanfei
- paulwong
- sgqt
- xiangjie88
- hudiemeng870329
- mft8899
- java_doom
- gaochunhu
- sichunli_030
- steven789654
- zw7534313
- silverend
- 深蓝传说
最新文章列表
java.lang.RuntimeException: Can't create handler inside thread that has not call
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
这时今天遇到的第二个错误。
原因是非主线程中没有创建Looper对象,需要先调用Looper.prepare()启用Looper。
解决办法是在线程的开始跟结束间调用Looper.prepar ...
Android中的Looper,Handler及HandlerThread简析
Can’t create handler inside thread that has not called Looper.prepare()
毕业后在深圳一家公司工作,目前公司在做的是与android相关的项目,有Android源码。
这几周,出现几次同事在使用Handler的时候,在调用时抛出RuntimeException的错误,异常消息如下:Can’t create handler in ...