本月博客排行
-
第1名
kaizi1992 -
第2名
arpenker -
第3名
wy_19921005 - hanbaohong
- jh108020
年度博客排行
-
第1名
龙儿筝 -
第2名
宏天软件 -
第3名
青否云后端云 - vipbooks
- wy_19921005
- benladeng5225
- fantaxy025025
- e_e
- kaizi1992
- tanling8334
- arpenker
- sam123456gz
- javashop
- zysnba
- xiangjie88
- lemonhandsome
- wallimn
- ganxueyun
- Xeden
- xyuma
- zhanjia
- wangchen.ily
- jh108020
- johnsmith9th
- zxq_2017
- jbosscn
- forestqqqq
- daizj
- ajinn
- xpenxpen
- 喧嚣求静
- ranbuijj
- kingwell.leng
- silverend
- kristy_yy
- lchb139128
- jveqi
- lich0079
- lzyfn123
- java-007
- sunj
- yeluowuhen
- lerf
- xiaoxinye
- flashsing123
- lxguy
- zhangjijun
- bosschen
- lyndon.lin
- sunnylocus
最新文章列表
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 ...