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 = HttpClientBuilder.create()
.setDefaultRequestConfig(defaultRequestConfig)
.setUserAgent(userAgent)
.build();
and the Application always directly crashes with:
java.lang.NoSuchFieldError: No static field INSTANCE of type Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; in class Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; or its superclasses (declaration of 'org.apache.http.conn.ssl.AllowAllHostnameVerifier' appears in /system/framework/ext.jar)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:144)
at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:912)
starting at API Level 22 (same for API Level 23).
The problem is: The class within the Android SDK doesnt have INSTANCE field declared.