Retrofit使用过程中遇到的问题2.0
来源:互联网 发布:windows网络监控工具 编辑:程序博客网 时间:2024/05/21 05:55
Retrofit2.0使用过程中遇到的问题
Retrofit在进行异步的网络请求时,代码如下:
Call<Post_BeaconResult> call = api.PostForm_foots(foots, share_get_loginticket, ts, qianmingcode);call.enqueue(new Callback<Post_BeaconResult>() { @Override public void onResponse(Call<Post_BeaconResult> call, Response<Post_BeaconResult> response) { String s = response.body().toString(); } @Override public void onFailure(Call<Post_BeaconResult> call, Throwable t) { LogUtil.d("&&&&&错误", t.getMessage().toString()); }});可能会抛出异常:RETROFIT: Use JsonReader.setLenient(true) to accept malformed JSON at line 1
我的解决办法是:在Module:app中添加
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
0 0
- Retrofit使用过程中遇到的问题2.0
- VC6 使用过程中遇到的问题
- easyui使用过程中遇到的问题
- MyEclipse使用过程中遇到的问题
- 使用Qt过程中遇到的问题
- storm 使用过程中遇到的问题
- selenium使用过程中遇到的问题
- Ubuntu使用过程中遇到的问题
- Toolbar使用过程中遇到的问题
- xcode 使用过程中遇到的问题
- 使用Echarts过程中遇到的问题
- Ibatis使用过程中遇到的问题。
- Codis使用过程中遇到的问题
- 使用Espresso过程中遇到的问题
- ElasticSearch使用过程中遇到的问题
- pulseaudio使用过程中遇到的问题
- Idea使用过程中遇到的问题
- Appium使用过程中遇到的问题
- 嵌入式Linux开发工程师所必学的理论知识
- 为什么现在的大学生喜欢去报名软件培训班
- 简单实现根据选项显示不同的表单
- 62-UDP 与 connect
- 使用命名管道连接MySQL
- Retrofit使用过程中遇到的问题2.0
- 初识Spring Boot
- cocos2D CCNode 5
- 第二册第九单元总结
- USB驱动或设备开发的基本认识
- 人脸检测、提取特征点(dlib下的三个例子)
- C++析构函数 什么时候用虚函数
- Linux wait() 和 waitpid()函数整理
- 时间复杂度 T(n)