美文网首页
使用 Retrofit 遇到的问题(待更新)

使用 Retrofit 遇到的问题(待更新)

作者: 敌军不是十五万 | 来源:发表于2017-03-08 16:36 被阅读80次
  • Gson
    由于compile 'com.squareup.retrofit2:converter-gson:2.2.0'中已经包含 Gson 相关,所以不需要重复依赖compile 'com.google.code.gson:gson:x.x.x'
    重复依赖以及依赖版本比 Retrofit 2.0 中所用 Gson 版本低的话,会造成
@Override
public void onFailure(Call<BaseResult<List<T>>> call
        , Throwable t) {
    Log.d("failure", t.getMessage());
}

打印内容为D/failure: com.google.gson.Gson.newJsonReader的错误

相关文章

网友评论

      本文标题:使用 Retrofit 遇到的问题(待更新)

      本文链接:https://www.haomeiwen.com/subject/owgbgttx.html