简体   繁体   中英

AsyncHttpClient don't work in Android 4.4 Kitkat

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)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM