官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 井研县| 长岭县| 葫芦岛市| 万州区| 清水县| 宁强县| 客服| 城步| 宾川县| 鄯善县| 乐昌市| 甘洛县| 融水| 日喀则市| 赤壁市| 阳朔县| 鲜城| 东乌珠穆沁旗| 宝应县| 无锡市| 八宿县| 明溪县| 正安县| 辽源市| 雷州市| 固原市| 长宁县| 河曲县| 安仁县| 开阳县| 万源市| 湟源县| 永寿县| 河西区| 博爱县| 固原市| 石柱| 务川| 林周县| 大英县| 鄂州市|