Android未调用Looper.prepare()-Can't create handler inside thread that has not called Looper.prepare()
来源:互联网 发布:linux下划线命名法 编辑:程序博客网 时间:2024/05/17 06:11
Android 2.3.3 Eclipse Version: 3.7.0 LogCat
LogCat 报错信息:
02-06 12:08:12.794: WARN/dalvikvm(503): threadid=18: thread exiting with uncaught exception (group=0x40015560)02-06 12:08:12.815: ERROR/AndroidRuntime(503): FATAL EXCEPTION: Thread-4902-06 12:08:12.815: ERROR/AndroidRuntime(503): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()02-06 12:08:12.815: ERROR/AndroidRuntime(503): at android.os.Handler.(Handler.java:121)02-06 12:08:12.815: ERROR/AndroidRuntime(503): at android.app.Activity.(Activity.java:680)02-06 12:08:12.815: ERROR/AndroidRuntime(503): at android.app.ListActivity.(ListActivity.java:175)02-06 12:08:12.815: ERROR/AndroidRuntime(503): at android.preference.PreferenceActivity.(PreferenceActivity.java:76)02-06 12:08:12.815: ERROR/AndroidRuntime(503): at com.taobao.nokia.manage.Preference.(Preference.java:62)02-06 12:08:12.815: ERROR/AndroidRuntime(503): at com.taobao.nokia.List.run(List.java:297)02-06 12:08:12.815: ERROR/AndroidRuntime(503): at java.lang.Thread.run(Thread.java:1019)02-06 12:08:12.864: WARN/ActivityManager(61): Force finishing activity com.taobao.nokia/.Htc
发生错误原因:线程内未调用Looper.prepare(),不能创建处理器。
解决办法:在线程List的run()中加入 Looper.prepare();
public void run() {// TODO Auto-generated method stubsuper.run();Looper.prepare();setting = new Preference(context);}
- Android未调用Looper.prepare()-Can't create handler inside thread that has not called Looper.prepare()
- Unity-Android: Can't create handler inside thread that has not called Looper.prepare()
- Android 错误提示: Can't create handler inside thread that has not called Looper.prepare()
- android之Can't create handler inside thread that has not called Looper.prepare()
- android can't create handler inside thread that has not called Looper.prepare()解决方案
- [Android]Can't create handler inside thread that has not called Looper.prepare()
- Android 报Can't create handler inside thread that has not called Looper.prepare()错误!
- Android中的Can't create handler inside thread that has not called Looper.prepare()异常
- Android进阶(八)Can't create handler inside thread that has not called Looper.prepare()
- Android : Can't create handler inside thread that has not called Looper.prepare() 异常
- android -- Can't create handler inside thread that has not called Looper.prepare()
- Android : Can't create handler inside thread that has not called Looper.prepare()
- Android开发Can't create handler inside thread that has not called Looper.prepare()
- Android java.lang.RuntimeException: Can\'t create handler inside thread that has not called Looper.prepare()
- android异常收集-Can't create handler inside thread that has not called Looper.prepare()
- Android开发报错 Can't create handler inside thread that has not called Looper.prepare()
- Android开发报Can't create handler inside thread that has not called Looper.prepare()错误
- Android开发报错 Can't create handler inside thread that has not called Looper.prepare()
- JAVA中各种去除空格
- 安慰一个父亲
- 【Paypal】即时付款通知IPN
- 友盟iOS使用报告发布
- Windows下curl使用
- Android未调用Looper.prepare()-Can't create handler inside thread that has not called Looper.prepare()
- 重载 与 重写
- JNI+NDK HELLOWORLD!
- Lua For Windows 环境配置及使sciTE支持中文
- java--迭代范型化 HashMap
- 流程图和线框图的关系
- 组播例子
- 什么是hosts文件?hosts文件在哪里
- web页面更改AD账户密码