Glide加载https图像时出错:javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
解决方法:在APP oncreate中调用方法handleSSLHandshake (
/* *忽略https证书验证防止Glide加载https图像并报告错误: * javax.net.SSL.sslhandshakeexception : Java.security.cert.certpathvalidatorexception :可信转发功能验证ke((try ) trustmanager ) ) trustallcerts=newtrustmanager ) ) )。 gtacceptedissuers ((返回新x509证书[0]; } @ overridepublicvoidcheckclienttrusted (x509 certificate [ ] certs,String authType ) } @ overridepublicvoidcheckservertrusttype //trustAllCerts是所有证书sc.init(null,trustAllCerts,new SecureRandom ); httpsurlconnection.setdefaultsslsocketfactory (sc.getsocketfactory ) ); httpsurlconnection.setdefaulthostnameverifier (newhostnameverifier ) @ overridepublicbooleanverify (字符串主机名称,字符串); }catch(exceptionignored ) { }