NullPointerException addToRequestQueue(com.android.volley.Request, java.lang.String)' on a null object reference -
i'm using http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/ , it's working fine in example project of login-register.(just login , register)
but after many attempts trying cardviews
, other widgets
, error appears on *logcat*
:
java.lang.nullpointerexception: attempt invoke virtual method 'void client.myproject.app.appcontroller.addtorequestqueue(com.android.volley.request, java.lang.string)' on null object reference @ client.myproject.registeractivity.registeruser(registeractivity.java:185) @ client.myproject.registeractivity.access$300(registeractivity.java:35) @ client.myproject.registeractivity$1.onclick(registeractivity.java:81) @ android.view.view.performclick(view.java:4780) @ android.view.view$performclick.run(view.java:19866) @ android.os.handler.handlecallback(handler.java:739) @ android.os.handler.dispatchmessage(handler.java:95) @ android.os.looper.loop(looper.java:135) @ android.app.activitythread.main(activitythread.java:5254) @ java.lang.reflect.method.invoke(native method) @ java.lang.reflect.method.invoke(method.java:372) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:903) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:698)
while these codes works fine in single app (just register login).
i'm using volley library. please help.
in androidmanifest.xml
add
<application android:name="yourpackagename.appcontroller" android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme">
Comments
Post a Comment