private interface ResourcesApi {
@POST(\"/synchronize\")
void getResources(@Body Map> map,
It means the @POST
annotation can't be found at runtime. Without the HTTP method type (and relative URL it contains), Retrofit cannot make the request.
Are you using Proguard or another tool to trim "unused" code? If so, instruct it to keep Retrofit's annotations.
Agree with @chad's answer, add below lines if still getting crash.
-keepattributes Signature
-keep class sun.misc.Unsafe { *; }
In addition to Jake's answer, this is what I had to add to my proguard
file to get it to work correctly:
-keep class com.google.gson.** { *; }
-keep class com.google.inject.** { *; }
-keep class org.apache.http.** { *; }
-keep class org.apache.james.mime4j.** { *; }
-keep class javax.inject.** { *; }
-keep class retrofit.** { *; }