这是我将图像下载到位图中的代码
if (null != url) {
try {
test(url,baseActivity);
final Bitmap bitmap = BitmapFactory.decodeStream((InputStream) new URL(url).getContent());
baseActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
imageView.setImageBitmap(bitmap);
}
});
} catch (Exception e) {
loadDefaultImage(context, imageView, resourceName, baseActivity);
}
}
但我遇到了一个例外
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
在此图像下载之前,他们是否有任何添加证书的方法