lang.IllegalArgumentException: Unable to create @Body converter for class c.g.a.c.a.f.b (parameter #1) for method e.a
hnabtiti opened this issue · 6 comments
fun createRetrofitInstance(okHttpClient: OkHttpClient, converter: Converter.Factory): Retrofit {
return Retrofit.Builder()
.baseUrl(STAGING_URL)
.client(okHttpClient)
.addConverterFactory(converter).build()
}
: java.lang.IllegalArgumentException: Unable to create @Body converter for class c.g.a.c.a.f.b (parameter #1)
for method e.a
W/Authentication: o.h0.a()
W/Authentication: o.h0.a()
W/Authentication: o.e0.a(:37)
W/Authentication: o.d0.a()
W/Authentication: o.d0$a.invoke(:2)
W/Authentication: java.lang.reflect.Proxy.invoke(Proxy.java:397)
W/Authentication: $Proxy0.a(Unknown Source)
W/Authentication: c.g.a.c.a.d.a(:2)
W/Authentication: c.g.a.g.f.e.c(:4)
W/Authentication: k.q.j.a.a.a()
W/Authentication: h.a.j0.run(:4)
W/Authentication: h.a.t1.a.a()
W/Authentication: h.a.t1.a$a.run(:9)
What's the deobfuscated trace?
@JakeWharton facing the same issue
Caused by: g.b.v: Can't locate argument-less serializer for class a. For generic classes, such as lists, please provide serializer explicitly.
Without a deobfuscated trace it's impossible to know what's going on. An executable sample would be even better.
@hnabtiti check the issue Kotlin/kotlinx.serialization#946
it's just that models might be in a different modele for which you might not have applied the proguard rules