Android version 6.0 has basically removed the Apahce Http Client from the SDK.
So the question is, what if I used the Apache HttpClient related class in my previous project?
Please crossing the answer to the net
Apache HTTP Client Removal
Android 6.0 release removes support for the Apache HTTP client. The If your app is using the-client and targets Android 2.3 (API Level 9) or higher with the HttpURLConnection class instead. This API was more efficient because it reduces network use through transparent compression and response caching, and Minimi Zes power consumption. To continue using the Apache HTTP APIs, you must first declare the following compile-time dependency in your build.gradle file:
{' org.apache.http.legacy '}
That is, add the above configuration to the Build.gradle.
Https://developer.android.com/intl/zh-cn/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client
Another hole: Even if we are using Android 6, and have joined the following uselibrary configuration, there may be a compile error as follows:
"Unable to find optional library:org.apache.http.legacy"
Workaround:
1. See if there are Org.apache.http.legacy.jar and Optional.json under the catalogue E:\software\Android\sdk\platforms\android-23\optional.
2, if there is no Optional.json, then you create a new such file, and then add the following content:
[ { "name": "Org.apache.http.legacy", "jar": "Org.apache.http.legacy.jar", "manifest": false } ]
Reprint http://blog.csdn.net/liuhongwei123888/article/details/50100697
Android 6.0 using Apache HttpClient