- Learning Concurrency in Kotlin
- Miguel Angel Castiblanco Torres
- 84字
- 2021-08-05 10:46:47
NetworkOnMainThreadException
In Java, network operations are blocking by nature. Calling a web service, for example, will block the current thread until a response is received or a timeout/error happens. Because blocking the UI thread would mean freezing all the UI – including animations and any other interactions – Android crashes whenever a network operation is made on the UI thread. The NetworkOnMainThreadException exception will be thrown whenever this happens, forcing developers to use a background thread, and thus improving the user experience.
推薦閱讀
- Learning Neo4j
- Spring Cloud Alibaba核心技術與實戰案例
- JavaScript+jQuery開發實戰
- Swift語言實戰精講
- PySide 6/PyQt 6快速開發與實戰
- Extending Puppet(Second Edition)
- Mastering Business Intelligence with MicroStrategy
- Processing創意編程指南
- 深入理解C指針
- Mastering AWS Security
- Android嵌入式系統程序開發:基于Cortex-A8(第2版)
- Visual FoxPro 6.0程序設計
- Advanced UFT 12 for Test Engineers Cookbook
- Machine Learning for Developers
- OpenCV Android Programming By Example