Unable to create converter for class`

There was a problem while testing.
java.lang.IllegalArgumentException: Unable to create converter for class`Last
view of the code is missing a sentence. It's really annoying.

Retrofit retrofit = new Retrofit.Builder()
                .baseUrl("http://apis.baidu.com/acman/zhaiyanapi/tcrand/")
                .addConverterFactory(GsonConverterFactory.create())
                .build();


Don't forget to import the package when you add this sentence without this sentence addConverterFactory(GsonConverterFactory.create()) . In this file, bulid.gradle guide
compile "com.squareup.retrofit2:converter-gson:2.0.2"

Guess you like

Origin blog.csdn.net/u013290250/article/details/51613032