• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help java.lang.NullPointerException: Attempt to invoke virtual method error

Randy_Gold

Lurker
I am getting this error whenever I try running my app. The app crashes when I press a button. Here is the error scrren:

java.lang.NullPointerException: Attempt to invoke virtual method 'android.text.Editable android.widget.EditText.getText()' on a null object reference
at com.ismail.financemanagement.RegisterActivity$1.onClick(RegisterActivity.java:52)
at android.view.View.performClick(View.java:7865)
at android.widget.TextView.performClick(TextView.java:14958)
at android.view.View.performClickInternal(View.java:7838)
at android.view.View.access$3600(View.java:886)
at android.view.View$PerformClick.run(View.java:29362)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8016)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)
 

Attachments

Welcome to Android Forums, Randy_Gold! :)
I am getting this error whenever I try running my app.
You're most likely to find help for this by posting on our Android Development board, where other developers hang out.

Please be as detailed as possible when posting there, for example, if you're using Android Studio, which version is it and what platform are you using? Also, using the 'code' tag to encase your text output makes for a neater, easier to read post.

Good luck with your app!
 
Back
Top Bottom