iOS 11出现的坑,Main Thread Checker: UI API called on a background thread: -[UIApplication statusBarOrien
来源:互联网 发布:sql 编辑:程序博客网 时间:2024/06/15 18:19
2017-11-13 11:39:04.348973+0800 PlantsAndFlowers[11262:2146383] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication statusBarOrientation]
PID: 11262, TID: 2146383, Thread name: (none), Queue name: BaseOperatorService, QoS: 0
Backtrace:
4 PlantsAndFlowers 0x0000000100bb4c0c __25-[MOBFBaseService _putAd]_block_invoke + 536
5 libdispatch.dylib 0x000000010104149c _dispatch_call_block_and_release + 24
6 libdispatch.dylib 0x000000010104145c _dispatch_client_callout + 16
7 libdispatch.dylib 0x0000000101050110 _dispatch_queue_serial_drain + 692
8 libdispatch.dylib 0x00000001010449a4 _dispatch_queue_invoke + 332
9 libdispatch.dylib 0x0000000101051104 _dispatch_root_queue_drain_deferred_wlh + 424
10 libdispatch.dylib 0x0000000101058100 _dispatch_workloop_worker_thread + 652
11 libsystem_pthread.dylib 0x0000000182adefd0 _pthread_wqthread + 932
12 libsystem_pthread.dylib 0x0000000182adec20 start_wqthread + 4
造成原因是因为原本 需要在主线程执行的代码 被放在了子线程里边
解决方法:在scheme 里边取消主线程检测 (如下图 不建议使用) 或者修改代码 把出问题的代码放在主线程里边即可
![](http://upload-images.jianshu.io/upload_images/4808506-c88d30cdcf22c0fd.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- iOS 11出现的坑,Main Thread Checker: UI API called on a background thread: -[UIApplication statusBarOrien
- Main Thread Checker: UI API called on a background thread:
- IOS真机切换UI界面时,出现“Only run on the main thread” 的解决方法
- Main Thread & UI Thread
- Android UI thread / main thread
- Android UI thread / main thread
- Running GPS positioning in a background thread on Android
- Unity Xcode 8 iOS 10 出现警告 Libinfo call to mDNSResponder on main thread
- Android 在使用webview报错 A WebView method was called on thread 'Thread-2599'
- 异常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
- Apache Pivot background Task 和 UI thread
- Error about updating UI in background thread
- java.lang.Throwable: Warning: A WebView methods must be called on the same thread.
- android开发 WebViewjava.lang.Throwable: A WebView method was called on thread 'JavaBridge'. All WebVie
- java.lang.RuntimeException: java.lang.Throwable: A WebView method was called on thread 'JavaBridge'.
- Can't toast on a thread that has not called Looper.prepare()
- Android异常解决--A WebView method was called on thread 'JavaBridge'. All WebView methods must be called
- LaTeX 参考文献 :未下载Endnote、NoteExpress
- 用nfs挂载内核时出现错误T T T T T T T *** ERROR: Cannot umount的解决办法
- Dom4j (org.dom4j.DocumentException: c Nested exception: c.)(转载)
- gradle 下载、安装
- java.lang.OutOfMemoryError异常解决方法
- iOS 11出现的坑,Main Thread Checker: UI API called on a background thread: -[UIApplication statusBarOrien
- CSDN-markdown编辑器
- Mysql数据库安全性问题【防注入】
- docker装crfpp、thrift
- learn opencv-使用OpenCV的自动红眼删除
- matlab中text 函数在显示字符串时的使用方法
- selenium webdriver问题解决(二)
- canvas以及paint的一些介绍
- 【Android源码系列】BroadcastReceiver启动源码解析