java.lang.IllegalArgumentException: @Field parameters can only be used with form encoding. (parameter #2)和java.lang.IllegalArgumentException: @Body parameters cannot be used with form or multi-part en

java.lang.IllegalArgumentException: @Field parameters can only be used with form encoding. (parameter #2) 错误 


解决方法需要在前面加上 @FormUrlEncoded注解


java.lang.IllegalArgumentException: @Field parameters can only be used with form encoding. (parameter #2)和java.lang.IllegalArgumentException: @Body parameters cannot be used with form or multi-part en_第1张图片

java.lang.IllegalArgumentException: @Body parameters cannot be used with form or multi-part encoding. (parameter #1)错误


下图所示  两个@FormUrlEncoded注解冲突 ,解决方法需要去掉一个  保留一个即可


java.lang.IllegalArgumentException: @Field parameters can only be used with form encoding. (parameter #2)和java.lang.IllegalArgumentException: @Body parameters cannot be used with form or multi-part en_第2张图片

你可能感兴趣的:(java.lang.IllegalArgumentException: @Field parameters can only be used with form encoding. (parameter #2)和java.lang.IllegalArgumentException: @Body parameters cannot be used with form or multi-part en)