- Flutter采坑—ERROR:DioError
- flutter 报错Bad state: Insecure HT
- :DioError [DioErrorType.DEFAULT]
- DioError (DioError [DioErrorType
- Flutter Web返回`DioError [DioError
- flutter-DioError (DioError [DioE
- Flutter: error:::DioError [DioEr
- Flutter:报错Unhandled Exception: B
- DioError [DioErrorType.RESPONSE]
- Flutter 报错: Error: No address as
最近换了一个安卓4.4的手机开发遇到如下报错
:DioError [DioErrorType.DEFAULT]: HandshakeException: Handshake error in client (OS Error:
CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(handshake.cc:354)) 无法获取本地证书
解决:
添加如下代码 强行信任
Dio dio = Dio();
(dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client){
client.badCertificateCallback=(cert, host, port){
return true;
};
};
网友评论