- 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.
推薦閱讀
- Java語言程序設計
- LabVIEW Graphical Programming Cookbook
- Java入門經典(第6版)
- Azure IoT Development Cookbook
- ASP.NET Core 5.0開發入門與實戰
- Full-Stack React Projects
- Mastering Ext JS
- SAP BusinessObjects Dashboards 4.1 Cookbook
- Julia高性能科學計算(第2版)
- C語言程序設計實驗指導 (第2版)
- Python High Performance Programming
- Web性能實戰
- FPGA嵌入式項目開發實戰
- Mastering PowerCLI
- Mastering Clojure