首页 > 编程语言 > 详细

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

时间:2018-08-18 15:22:06      阅读:1348      评论:0      收藏:0      [点我收藏+]
@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);

  

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

原文:https://www.cnblogs.com/liyanli-mu640065/p/9497293.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!