bunq / sdk_java

Java SDK for bunq API
MIT License
49 stars 23 forks source link

Android issue: HttpClient was deprecated in API Level 22 and removed in API Level 23 #69

Closed basst85 closed 6 years ago

basst85 commented 6 years ago

The dependency "org.apache.httpcomponents.httpclient" is removed from API level 23+ Maybe a other HttpClient can be used, like "OkHttp"?

Steps to reproduce:

  1. Use SDK in app on Android 8.0

What should happen:

What happens:

I get this error when executing ApiContext.create:

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/framework.jar:classes2.dex) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:146) at com.bunq.sdk.http.ApiClient.buildHttpClient(ApiClient.java:120) at com.bunq.sdk.http.ApiClient.<init>(ApiClient.java:113) at com.bunq.sdk.model.core.Installation.create(Installation.java:43) at com.bunq.sdk.context.ApiContext.initializeInstallation(ApiContext.java:173) at com.bunq.sdk.context.ApiContext.initialize(ApiContext.java:163) at com.bunq.sdk.context.ApiContext.create(ApiContext.java:127) at com.bunq.sdk.context.ApiContext.create(ApiContext.java:109) at com.bunq.sdk.context.ApiContext.create(ApiContext.java:101)

Traceback

SDK version and environment

Response id

Extra info:

OGKevin commented 6 years ago

Thanks for reporting.

If thats the case, than this is related to bunq/sdk_java#25 and should be fixed in the 0.12.5 release!

Duplicate of #25

basst85 commented 6 years ago

You're right, this issue is a bit a duplicate of #25. Sorry for that :-)

OGKevin commented 6 years ago

@basst85 no problem at all :thumbsup: more reason to release 0.12.5!

OGKevin commented 6 years ago

Closing due to #25