AsyncHttpResponseHandler使用过程中报错,无法引入org.apache.http.Header
在使用ANdroidStudio时,采用高编译版本版本android6.0,报错,引用的org.apache.http.Header类找不到。

Android 6.0 release removes support for the Apache HTTP client.
说Apache Http Client在android 6.0中被移除(废弃)。
解决办法:
在build.gradle中配置如下方案即可解决:

android {
    useLibrary 'org.apache.http.legacy'
    ......
}
如本人配置如下图:Android解决Handler报错的问题

相关文章:

  • 2021-09-25
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2021-08-27
  • 2022-01-17
  • 2021-04-01
猜你喜欢
  • 2021-12-11
  • 2021-11-23
  • 2022-12-23
  • 2021-07-10
  • 2021-10-06
  • 2021-09-16
相关资源
相似解决方案