簡體   English   中英

AsyncHttpClient 在 Android 4.4 Kitkat 中不起作用

[英]AsyncHttpClient don't work in Android 4.4 Kitkat

我將com.loopj.android.http.AsyncHttpClient用於我對服務器的 https 請求:

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

使用 android 4.4.4 Kitkat 設備,我收到此錯誤:

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 需要 Android API 23 (Marshmallow) 或更高版本,因此不適用於 Kitkat。 請參閱AsyncHttpClient 網頁上的“功能”部分。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM