Skip to content Skip to sidebar Skip to footer

Using Apache Httpclient With Android Sdk 23. Nosuchmethod

Already created a bugticket at google for this. Possibly anyone has any ideas? I wanted to use a normal HTTPClient (CloseableHttpClient) within Apache Library, mCloseableHttpClient

Solution 1:

The following class has been removed as of API level 22

org.apache.http.conn.ssl.AllowAllHostnameVerifier

You can see the removed classes in the official api changes

You can use HttpURLConnection class instead.

According to official guide

This API is more efficient because it reduces network use through transparent compression and response caching, and minimizes power consumption

** EDIT **

According to CommonsWare's comment below, there are also other 3rd party options including OkHttp or Apache's separate HttpClient library for Android

Solution 2:

Is a problem of a library version try with this versions

implementation 'org.apache.httpcomponents:httpclient:4.5.3'
    api 'org.apache.httpcomponents:httpcore:4.4.6'
    api 'org.apache.httpcomponents:httpmime:4.3.6'

Post a Comment for "Using Apache Httpclient With Android Sdk 23. Nosuchmethod"