Android 错误提示: Can't create handler inside thread that has not called Looper.prepare()
2014-03-05 15:36
316 查看
Can't create handler inside thread that has not called Looper.prepare()
将 Handler handler = new Handler() 更为 Handler handler = new Handler(Looper.getMainLooper()).方可解决
也可以在run 之前 调用 Looper.prepare();
来解决此类问题
原因可点击: 参考文章
将 Handler handler = new Handler() 更为 Handler handler = new Handler(Looper.getMainLooper()).方可解决
也可以在run 之前 调用 Looper.prepare();
来解决此类问题
原因可点击: 参考文章
相关文章推荐
- Android编译中错误提示FAQ (不定期更新)
- Android studio提示Android studio 在gradle文件中引入support:appcompat-v7:22.2.0包的时候出现Failed to resolve的错误
- Android 启动模拟器是出现“Failed to allocate memory: 8”错误提示的原因及解决办法
- Android 错误提示:Conversion to Dalvik format failed with error 1 解决办法
- android 解决.XML提示ava.lang.NullPointerException at错误后XML没显示
- Android studio升级3.0,提示“Error:Cannot choose between the following configurations of project”错误
- Android老版本项目导入到新版SDK提示错误
- eclipse导入android工程,提示“Select at least one project”错误
- Eclipse安装ADT Plugin时发生错误,提示连接不到 https://dl-ssl.google.com/android/eclipse/...的解决办法!
- android工程中引入第三方JAR包后安装APK时老是提示找不到库文件 || Android如何将程序打成jar包 || 运行java.lang.noclassdeffounderror错误
- Eclipse安装ADT Plugin时发生错误,提示连接不到 https://dl-ssl.google.com/android/eclipse/...的解决办法
- Android Studio提示模拟器错误:Could not initialize OpenglES emulation, use '-gpu off' to disable it.
- android导入工程出现红色感叹号运行提示错误
- Android ClearEditText:输入用户名、密码错误时整体删除及输入为空时候晃动提示
- Android eclipse打包提示代码错误解决方法
- android工程导入没有错误,运行提示Unable to instantiate activity ComponentInfo
- eclipse android 提示 Program "sh" not found in PATH 编译错误
- 高德地图Android错误码1008、32和7;错误提示invalid_user_scode;返回key鉴权失败的解决办法
- android部分机型选择图片提示错误
- android Eclipse执行项目提示错误: unable to execute dex: GC orerhead limit exceeded