java.lang.IllegalArgumentException: No Retrofit annotation found. (parameter #1) for method ApiService.getMethod

@FormUrlEncoded
@POST("getMethod") Observable<Bean> getMethod(String field);

  今天在写Retrofit 网络接口时,报错:

java.lang.IllegalArgumentException: No Retrofit annotation found. (parameter #1)  for method ApiService.getMethod

其中正确的写法应该是:
@FormUrlEncoded
@POST("getMethod")
Observable<Bean> getCity(@Field("field") String field);

  

猜你喜欢

转载自www.cnblogs.com/liyanli-mu640065/p/9497293.html