Unable to invoke no-args constructor for Product.class

本秂侑毒 提交于 2019-12-01 21:12:27

Add default constructor for all classes. Example:

public class Product{

    public Product(){
    }

}

problem solved, I am doing a foolish call To Gson because i am obtaining a Product class that contains list of other Classes(Result.class etc) but i am sending Product[].class to Gson to convert Hence it thrown exception.

Just add an no argument constructor for the Bean class.

public class Product{

  public Tweet(){
  }

}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!