binbinyang--Unable to create converter for class
昨天下写 Retrofit 的时候
测试的时候出了问题。
Java.lang.IllegalArgumentException: Unable to create converter for class
这个东西出来的时候 没太懂什么意思,到网上找了资料 才知道
解决办法
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("http://apis.baidu.com/acman/zhaiyanapi/tcrand/")
.addConverterFactory(GsonConverterFactory.create())
.build();
加这句话的时候,别忘记导包了。这个文件里面bulid.gradle 导
'com.squareup.retrofit2:converter-gson:2.3.0'