相关疑难解决方法(0)

使用Android Volley发出HTTPS请求

我正在尝试使用此代码发出https请求:

RequestQueue queue = Volley.newRequestQueue(getApplicationContext());
request = new Request<String>(Request.Method.GET,"https://devblahblahblah.com/service/etc",errListener);
Run Code Online (Sandbox Code Playgroud)

但我收到这个错误:

com.android.volley.NoConnectionError:javax.net.ssl.SSLHandshakeException:java.security.cert.CertPathValidatorException:未找到证书路径的信任锚.

有两点需要注意:

  1. HTTPS证书有效.轻松打开,浏览器没有任何警告.
  2. 上面的代码适用于HTTP链接.

我实际上需要知道Android Volley框架中是否有任何交换机/选项,我将成功点击HTTPS URL?

https android android-volley

52
推荐指数
2
解决办法
6万
查看次数

标签 统计

android ×1

android-volley ×1

https ×1