I'm using Android studio , sqlite database my code was working correctly , but when I added "posid" column to "contacts" table the program doesn't work
......... thanks for everybody can help me
I'm using Android studio , sqlite database my code was working correctly , but when I added "posid" column to "contacts" table the program doesn't work
......... thanks for everybody can help me
You're referring to an EditText reference that has never been initialized. Namely, et4.
Also, I would suggest not having member variables that hold onto references to your views as this is a common source of memory leaks. Instead, just call findViewById when you need a local reference to your view.
You didn't initialize the EditText et4
and that's the reason for the exception, also when you update the table schema "add column(s)" you should increase your database version, so that android can update the table
int DATABASE_VERSION = 2; // instead of 1