I used a database "Login" in my application android. This application must work in my tablette, but when i install .apk in my tablette all the data of my data base dissapear !!!
I don't know what's the problem exactly, i need your help
here's my code for database:
and here's the activity :
Joined: Jul 12, 2013
Sorry, i put another code which i change it
the problem is when i debug or i run the application doesn't work
I change the line 166 by
The interface display, but there's always an error
here's the logcat :
Joined: Mar 22, 2005
NullPointerExceptions are relatively easy to debug - they even tell you the line number on which you're trying to invoke a method on a null object reference. With that knowledge, it shouldn't be hard to figure out which object is null. You can either use a debugger, or do some logcat logging at relevant locations throughout the code.
First, you shouldn't have to 'think' the problem is somewhere, you need to know where it is - by correctly logging errors and viewing those logs. Don't print stacktraces because you probably won't be able to see them. Instead, use Log.e(...) to log the results so you can view them in LogCat.
Second, you should read your logs so you can tell if there is something going wrong that isn't crashing the application, but still logs as an error. There will be one (and I bet it is either an IO error preventing you from writing the file or a SQL error because the table you are trying to read doesn't exist).