Retrofit 2.0 + GSON Unable to invoke no-args constructor for interface

前端 未结 3 862
借酒劲吻你
借酒劲吻你 2020-12-19 02:20

I\'m using Retrofit 2.0 in my app. Everything was quite good, but when I started request with no args, GSON returns:

Unable to invoke no-args constructor for         


        
3条回答
  •  独厮守ぢ
    2020-12-19 02:58

    This was really helpful. I had the same issue and it worked by replacing Call with MyObject in the interface where we write the function for the API call request followed by removing .enque at the call site.

提交回复
热议问题