Skip to content Skip to sidebar Skip to footer

Openorcreatedatabase Gives Nullpointerexception

i used databases before in the android app i am working on so usualy i open() the database when my query is finished i close() it again with my latest change to my database class

Solution 1:

The stacktrace says the Context you passed to SQLiteOpenHelper was null.

The code doesn't show how you initialize your ABezoeAdapter where the Context comes from but that's where you should be looking to solve the problem.

Solution 2:

I just solved my problem!! (happy modus)

i had called the function gegevensupdaten() from my 3th class AWebServerAdapter

there seems to be something wrong with the context of that class to be able to do databaseactions with my 2nd(Abezoeadapter) class

so i returned the data from webserver to my main(1st,bezoekrapporten) class and called gegevensupdaten() from my 1st class

why this context of 3th class doesn't work is still a mystery for me

Post a Comment for "Openorcreatedatabase Gives Nullpointerexception"