在Android 6.0 :The type org.apache.http.HttpEntityEnclosingRequest cannot be resolved
解决办法:
If you are compiling against Android 6.0 (SDK 23), you need to include org.apache.http.legacy library.
如果用 的是Android Studio ,则加上
android {
useLibrary ‘org.apache.http.legacy’
}
如果用的Eclipse:
把AndroidSDK/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