"unable to create converter for java.util.list retrofit 2.0.0-beta2" Code Answer

1

in the 2+ version you need to inform the converter

converters

by default, retrofit can only deserialize http bodies into okhttp's responsebody type and it can only accept its requestbody type for @body.

converters can be added to support other types. six sibling modules adapt popular serialization libraries for your convenience.

gson: com.squareup.retrofit:converter-gson jackson: com.squareup.retrofit:converter-jackson
moshi: com.squareup.retrofit:converter-moshi
protobuf: com.squareup.retrofit:converter-protobuf
wire: com.squareup.retrofit:converter-wire
simple xml: com.squareup.retrofit:converter-simplexml

// square libs, consume rest api
compile 'com.squareup.retrofit:retrofit:2.0.0-beta1'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta1'

so,

string baseurl = "" ;
retrofit client = new retrofit.builder()
    .baseurl(baseurl)
    .addconverterfactory(gsonconverterfactory.create())
    .build();
By Patrick Michalina on May 31 2022

Answers related to “unable to create converter for java.util.list retrofit 2.0.0-beta2”

Only authorized users can answer the Search term. Please sign in first, or register a free account.