![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
retrofit
qugengting
这个作者很懒,什么都没留下…
展开
-
Retrofit网络请求报错java.lang.NumberFormatException: Expected an int but was...
完整报错是:com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 154036037000000 at line 66 column 27 path $.org[12].id错误原因:明显地,这里已经给足了提示,org对象数组中的id属性,原来应该是int类型,...原创 2018-11-02 17:20:50 · 4122 阅读 · 1 评论 -
retrofit调用https接口报错java.security.cert.CertPathValidatorException
有些https接口,用retrofit+okhttps调用会报错:javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.解决方法是在每次调用接口前调用以下方法:import java....原创 2018-12-11 10:47:14 · 3129 阅读 · 0 评论 -
java.net.SocketException: sendto failed: ECONNRESET (Connection reset by peer)
刚开始出现这个错误,还以为自己使用retrofit不当引起的,后来改用HttpUrlConnection也报这个错误,网上各种搜索没有答案,后来发现是上传参数的值太大导致的,硬伤啊。...原创 2019-01-18 16:26:27 · 780 阅读 · 0 评论