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 CardView
s and other widgets, this error appears on the LogCat
:
java.lang.NullPointerException: Attempt to invoke virtual method 'void client.myproject.app.AppController.addToRequestQueue(com.android.volley.Request, java.lang.String)' on a null object reference
at client.myproject.RegisterActivity.registerUser(RegisterActivity.java:185)
at client.myproject.RegisterActivity.access$300(RegisterActivity.java:35)
at client.myproject.RegisterActivity$1.onClick(RegisterActivity.java:81)
at android.view.View.performClick(View.java:4780)
at android.view.View$PerformClick.run(View.java:19866)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
While these codes works fine in a single app (just with register login).
I'm using Volley library.