Android project uses HttpClient 4.5

2019-02-25 14:05发布

问题:

I would like to use Apache HttpClient 4.5, so the line

compile 'org.apache.httpcomponents:httpclient:4.5'

is added in my build.gradle, and I get the following in Gradle Console

Configuration on demand is an incubating feature.
WARNING: Dependency org.apache.httpcomponents:httpclient:4.5 is ignored for debug as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages

I would like to know what is the problem and how could I solve it. Thanks^^

回答1:

Go to Apache, I have found for Android they use HttpClient for Android 4.3.5. My projects use these Jar files as library (not compiled in gradle). You can try download here. Hope this help!