1. Are you ready for the Galaxy S20? Here is everything we know so far!

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

Discussion in 'Android Help' started by Randy_Gold, May 27, 2020.

  1. Randy_Gold

    Randy_Gold Lurker
    Thread Starter

    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)
     

    Attached Files:




    1. Download the Forums for Android™ app!


      Download

       
  2. MoodyBlues

    MoodyBlues Compassion is cool!
    VIP Member

    Welcome to Android Forums, Randy_Gold! :)
    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!
     
    ocnbrze likes this.
Loading...

Share This Page

Loading...