关于Calling View methods on another thread than the UI thread的错误
来源:互联网 发布:golang ide 编辑:程序博客网 时间:2024/05/29 18:50
唉,今天又碰到一坑,在原生的界面使用分享没一点问题,各项正常,然后加载webview的时候,在webview中去进行分享,QQ,微信等都没问题,但是微博分享却尼玛报错,心里一万只草泥马~~控制台抛出Calling View methods on another thread than the UI thread此异常,一看名字UI,thread,心里猜想这应该是UI线程问题,然后网上找找资料一看果然如此,因为在webview中调用微博不属于UIthread,所以解决办法就是如下
if(TextUtils.isEmpty(shar_native)){ mActivity.runOnUiThread(new Runnable() { @Override public void run() { performShare(SHARE_MEDIA.SINA); } });
0 0
- 关于Calling View methods on another thread than the UI thread的错误
- 关于Calling View methods on another thread than the UI thread的错误
- Calling View methods on another thread than the UI thread.错误
- 解决java.lang.IllegalStateException: Calling View methods on another thread than the UI thread
- 【已解决】Calling View methods on another thread than the UI thread.
- Solved this program:accessed from a thread other than the thread it was created on.
- WebView methods on same thread error
- you are calling a UIKit method that can only be invoked from the UI thread.
- IOS真机切换UI界面时,出现“Only run on the main thread” 的解决方法
- [Android]All WebView methods must be called on the same thread.线程安全
- android4.1 JELLY_BEAN:All WebView methods must be called on the same thread[问题已解决]
- java.lang.Throwable: Warning: A WebView methods must be called on the same thread.
- Cause by:All WebView methods must be called on the same thread[问题已解决]
- 安卓调用JS All WebView methods must be called on the same thread
- 异常A WebView method was called on thread 'JavaBridge'. All WebView methods must be called on the same
- A WebView method was called on thread 'JavaBridge'. All WebView methods must be called on the same t
- 关于Only the original thread that created a view hierarchy can touch its views的解决方案
- 关于Only the original thread that created a view hierarchy can touch its views的解决方案
- 关于nodejs
- Matlab画图技巧之消除空白
- java对字符串进行去重并排序
- 杭电-2089 不要62 (打表)
- cocos2dx v3.x之HttpRequest改动
- 关于Calling View methods on another thread than the UI thread的错误
- LinuxC编程实战之文件操作
- 自己实现 SharedPtr(4)—— 一个代码洁癖的救赎
- C语言getpriority()函数:取得程序进程执行优先权
- 拼图游戏学习
- jsp中Post和Get请求获取表单里的中文
- PHP 检测是否全为数字或者字母方法ctype_alnum(String text)
- linux管理和进程(4)
- 2016 Multi-University Training Contest 1-1001---HDU 5723 Abandoned country(DFS+最小生成树)