@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> getMethod(@Field("field") String field);

  

相关文章:

  • 2021-06-11
  • 2022-01-03
  • 2021-10-12
  • 2021-12-14
  • 2021-10-01
  • 2021-08-08
  • 2021-12-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-20
  • 2022-12-23
  • 2022-01-13
  • 2022-01-19
  • 2022-12-23
相关资源
相似解决方案