配置错误信息:
The type org.apache.http.Header cannot be resolved. It is indirectly referenced from required .class files。
原因是因为 6.0后android sdk 取消了这个apache的类。
类包org.apache.http.legacy.jar
如果是android studio 就增加
android {
useLibrary 'org.apache.http.legacy'
}
如果是eclipse就在android-sdk-windows/platforms/android-23/optional/org.apache.http.legacy.jar添加到你的libs文件夹下面就可以了
参考
http://stackoverflow.com/questions/32434488/the-type-org-apache-http-header-cannot-be-resolved-it-is-indirectly-referenced
本文介绍了如何解决在Android开发中遇到的配置错误问题:The type org.apache.http.Header cannot be resolved.。针对此问题提供了两种解决方案:对于Android Studio用户需要在build.gradle文件中加入特定配置;对于Eclipse用户则需要手动将org.apache.http.legacy.jar添加到项目的libs文件夹中。
9022

被折叠的 条评论
为什么被折叠?



