功能参数问题

时间:2016-08-02 04:16:08

标签: java android generics

public class LoginRequest extends GsonRequest<HttpModel<Login>> {

     public LoginRequest(Map<String , String> params,Response.Listener<HttpModel<Login>> listener, Response.ErrorListener errlistener) {

            super(Method.POST,url,(HttpModel<Login>).class, null, params, listener, errlistener);
     }
}

超级有趣的第二个参数错误 该函数需要 Class<HttpModel<Login>>.class

1 个答案:

答案 0 :(得分:0)

检查您的GsonRequest类。你传递错误的参数。您可以查看此链接以获取帮助

https://developer.android.com/training/volley/request-custom.html