from:https://stackoverflow.com/questions/32434488/the-type-org-apache-http-header-cannot-be-resolved-it-is-indirectly-referenced
If you are compiling against Android 6.0 (SDK 23), you need to include org.apache.http.legacy library.
In Android Studio add
android {
useLibrary 'org.apache.http.legacy'
}
to build.gradle.
In Eclipse copy org.apache.http.legacy.jar
from AndroidSDK/platforms/android-23/optional
to libs folder.