NullPointerException addToRequestQueue(com.android.volley.Request, java.lang.String)' on a null object reference

后端 未结 7 1620
你的背包
你的背包 2020-12-09 08:32

I\'m using AndroidHive register login and it\'s working fine in example project of this login-register.

But after many attempts trying it with CardViews

7条回答
  •  心在旅途
    2020-12-09 09:27

    You didn't pass any data to the volley method, that means it get null data (empty data)..... see example:

    protected Map getParams() throws AuthFailureError {
                    Map map=new HashMap<>();
                    map.put(region, regionName);
                    return map;
                }
    

    if regionName is empty it will give you NullPointerException, so regionName must have something.....

提交回复
热议问题