您的位置:首页 > 移动开发 > Android开发

Android遇到的问题及解决(持续更新中)

2016-03-20 20:02 423 查看
1.Apache HTTP Client Removal

Android 6.0 release removes support for the Apache HTTP client. If your app is using this client and targets Android 2.3 (API level 9) or higher, user the HttpURLConnection class instead. This API is more efficient because it reduces network use through
transparent compression and response caching, and minimizes power consumption. To continue using the Apache HTTP APIs, you must first declare the following compile-time dependency in your build.gradle file:

android{

        useLibrary 'org.apache.http.legacy'

}

2.Android Studio 2.0 Instant Run  不起作用,导致代码修改了,运行之后,真机上并未修改

原因:不支持API Level 21 (Android 5.0)以下机型

解决:用模拟器、5.0以上机型、在设置中关闭Install Run、或者每次更新代码插拔以下USB调试线(好蠢)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息