How to update Apache HttpClient versions on Android

I added HttpClient 4.3.3 for android to the build.gradle file as described by Apache , but my application has not been resized. Because of this, I am sure that although my IDE shows httpclient-android-4.3.3 as an external library, it does not actually turn on and is not used by my application.

I tried to check the version of the http client according to this post , but VersionInfo.loadVersionInfo() continues to return null.

My questions come down to:

  • How to check the version of Apache HttpClient that I am using?
  • How can I make my application use the version specified in Gradle? Should I exclude Android HttpClient in my gradle assembly?
+6
source share
1 answer

Android comes with an apache HttpClient 4.0 plugin, and gradle is ignored when trying to import a newer version. (This gives me a warning: "The org.apache.httpcomponents: httpclient: 4.4.1 dependency is ignored for debugging, as this may contradict the internal version provided by Android.")

There is an official workaround. This is the httpclient fork with different package names and other compatibility changes. You can find it in the maven repository (or search for "httpclient-android").

+2
source

Source: https://habr.com/ru/post/972981/


All Articles