你可能需要把以前的项目从Eclipse移到Android Studio, 如果你使用了HttpClient以及和他相关的开源框架, 恭喜你, 可能会报一下错,

这么大的事, 官方也给了解决方案:
官方文档: Android 6.0 Changes
http://developer.android.com/intl/zh-cn/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client

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

  大概就是删除了HttpClient, 用HttpURLConnection替代, 巴拉巴拉…. 如果还要继续使用Apache HTTP API, 需要在Module的build.gradle里面配置这句:

android {     useLibrary 'org.apache.http.legacy'}

在然后就能用HttpClient了

更多相关文章

  1. 整理出20个Android很有用的代码片段
  2. ReactNative 中 android按两次返回键退出当前应用程序
  3. Failed to extract native libraries, res=-2
  4. android缓存框架ASimpleCache
  5. android 五大应用开发框架是什么
  6. [Android] 开发资料收集:依赖注入框架
  7. Android(安卓)Volley.jar包下载
  8. Android(安卓)USER 版本与ENG 版本的差异--MTK官方解释
  9. android cts 相关

随机推荐

  1. Android微信支付获取二次签名Sign的方法
  2. eclipse检测不到android的手机
  3. Android(安卓)SDK无法更新问题解决
  4. android中的字符长度
  5. Android开机动画理解
  6. Android 夜间模式系列笔记(一)AppCompatDel
  7. Android 自定义标签属性设置及使用
  8. Android(安卓)C程序打印logcat日志
  9. android shader
  10. Android源码 Bluetooth设置的类说明