Android6.0以后, 不再提供org.apache.http.*(只保留几个类),所以导致使用HttpClient的时候会报错,比如

android-async-http等等。

HttpClient在Android2.2以后就不提倡使用了。

这里解决办法就是libs中加入org.apache.http.legacy.jar

android studio还需要在build.gradle中加入:

android {
useLibrary
'org.apache.http.legacy'
}这样就可以了。 org.apache.http.legacy.jar下载地址点击打开链接

更多相关文章

  1. android Listview 获取任意指定item数据 getChildAt 挂起 解决办
  2. 3.addView调用之后导致子布局的android:layout_width="match_par
  3. Android(安卓)RecyclerView异步更新数据导致的崩溃问题
  4. Android(安卓)studio 升级Android(安卓)Support Repository(46.0
  5. android:targetSdkVersion 属性导致程序问题
  6. Android中Handler导致内存泄漏的原理分析
  7. android 键盘弹出,布局重绘
  8. android如何保留小数点后x位数字
  9. Android(安卓)编译环境配置搭建(Ubuntu 12.04)及环境导致编译错

随机推荐

  1. 【Android】getDimension,getDimensionPi
  2. Android显式intent和隐式intent
  3. Android开发--Intent-filter属性详解 (转
  4. 获取手机的mac地址
  5. android 初始化时获得控件位置,宽高的属性
  6. Android(安卓)Donut Makefile分析之一 (b
  7. Android(安卓)Handler消息机制中的Thread
  8. 获取手机中已安装apk文件信息(PackageInf
  9. Animation用法_animation动画效果
  10. Android(安卓)Studio 超级全常用快捷