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, use 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' }

也就是说Android 6.0移除了httpClient的SDK,推荐使用HttpURLConnection。如果你还想用httpClient,在build.gradle添加上面上面的代码就好了。

此library在本地的sdk中:sdk\platforms\android-23\optional

更多相关文章

  1. 第一行代码:AlertDialog
  2. Android 自动更新代码
  3. Android 自制一个工作日历 原代码
  4. android 网络视频代码
  5. android版本更新代码
  6. 系出名门 Android源代码
  7. Android应用程序安装过程源代码分析(3)
  8. Android开发——控件基础(七)ListView组件:示例代码
  9. Ubuntu 13.04 编译环境配置及android 2.3 源代码编译时出现了以

随机推荐

  1. 通过WifiManager,DhcpInfo获取android IP
  2. Android(安卓)获取状态栏的高度
  3. Android启动优化
  4. linux基础教程--安装Android(安卓)SDK
  5. android之View属性
  6. cocos2d-x3.0beta版+NDK-r9b在android上
  7. android点击邮箱链接跳转发送
  8. Android(安卓)深入解析selector
  9. Android(安卓)ScrollView 判断到顶到底,和
  10. Android:开发常用的名令集锦