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

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.

主站蜘蛛池模板: 宁乡县| 郧西县| 炎陵县| 深州市| 乐安县| 璧山县| 阳城县| 聊城市| 长宁区| 六枝特区| 安陆市| 明光市| 苏尼特右旗| 武胜县| 兴义市| 朝阳区| 夏津县| 大城县| 澄江县| 蒲江县| 沁源县| 沅江市| 平塘县| 蛟河市| 南阳市| 克什克腾旗| 遂溪县| 山西省| 太白县| 武宁县| 叙永县| 疏附县| 克山县| 金阳县| 蒲城县| 石河子市| 三都| 静海县| 大庆市| 奈曼旗| 镇赉县|