No Retrofit annotation found. (parameter #1)
Solution 1:
My problem was that I had the @POST
annotation, but forgot the @Body
annotation for the parameter.
Solution 2:
Addition to Destil's answer
Make sure the parameters
you pass to the retrofit interface methods(i.e callbacks, headers, body )
are only belongs to retrofit package
. e.g. Not custom callbacks that you want on your own.
Solution 3:
Also make sure you add @Query
or @Field
for all the parameters , depending on whether you issuing GET/POST.
eg:
@GET("/api/Books/GetAll")
void GetRecentBooks(@Query int Offset, Callback<List<Book>> cb);