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

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.

主站蜘蛛池模板: 台中县| 嘉兴市| 武强县| 建水县| 寿阳县| 汕尾市| 泰和县| 即墨市| 淮安市| 逊克县| 津南区| 乌拉特后旗| 资源县| 曲靖市| 福建省| 阳城县| 灵川县| 鸡泽县| 济阳县| 白山市| 德清县| 彭阳县| 潼关县| 阿拉善盟| 闸北区| 阳西县| 永善县| 大同县| 安泽县| 汉中市| 湖北省| 柘荣县| 花莲县| 玉门市| 兴仁县| 邹城市| 永宁县| 城口县| 沙坪坝区| 英吉沙县| 台前县|