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

时间:2018-08-18 15:26:33   收藏:0   阅读:1765
@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);

  

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!