AsyncHttpClient don't work in Android 4.4 Kitkat

0

I am using com.loopj.android.http.AsyncHttpClient for my https request to server :

AsyncHttpClient client = new AsyncHttpClient();
String url = Const.URL;
client.setTimeout(60000);
client.get(url, new MyJsonHttpResponseHandler("FirstConnect", restClientCallback));

Using android 4.4.4 Kitkat device, I got this error :

W/System.err: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xaba120e0: Failure in SSL library, usually a protocol error
error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:744 0x52532ec8:0x00000000)
at 
com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:449)

java
ssl
tls1.2
asynchttpclient
asked on Stack Overflow Jun 11, 2019 by moran moro

1 Answer

0

AsyncHttpClient requires Android API 23 (Marshmallow) or higher, so won't work on Kitkat. See "Features" section on AsyncHttpClient webpage.

answered on Stack Overflow Dec 8, 2019 by CKP78

User contributions licensed under CC BY-SA 3.0