0

i'm trying to update data that are already in the database but i get this error

java.lang.NullPointerException: Attempt to invoke virtual method 'android.text.Editable android.widget.EditText.getText()' on a null object reference 

and it's in the line 49

looks like this

boolean isUpdate = db.updateData(id.getText().toString(), 
username.getText().toString(), name.getText().toString(), 
email.getText().toString(), password.getText().toString())`

what did i do wrong?

Vladyslav Matviienko
  • 10,610
  • 4
  • 33
  • 52
  • 3
    Possible duplicate of [What is a NullPointerException, and how do I fix it?](https://stackoverflow.com/questions/218384/what-is-a-nullpointerexception-and-how-do-i-fix-it) – Vladyslav Matviienko Sep 27 '19 at 04:27

1 Answers1

0

You are most likely pointing to a resource that isn't on the XML file you loaded for the Actvity/Fragment.

Shawn
  • 1,222
  • 1
  • 18
  • 41