java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.nasimahmed.quizgame/com.example.nasimahmed.quizgame.WorldHistory}: java.lang.NullPointerException: Attempt to invoke virtual method 'long android.database.sqlite.SQLiteDatabase.insert(java.lang.String, java.lang.String, android.content.ContentValues)' on a null object reference

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Nasim Ahmed
, 1 year ago
Unable to start activity ComponentInfo{com.example.nasimahmed.quizgame/com.example.nasimahmed.quizgame.WorldHistory}: java.lang.NullPointerException: Attempt to invoke virtual method 'long android.database.sqlite.SQLiteDatabase.insert(java.lang.String, java.lang.String, android.content.ContentValues)' on a null object reference
via Stack Overflow by Abhi
, 1 year ago
Unable to start activity ComponentInfo{com.example.abhishek.httpclient/com.example.abhishek.httpclient.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.database.Cursor
via Stack Overflow by Deviousterran
, 2 years ago
Unable to start activity ComponentInfo{com.example.balefire.test/com.example.balefire.test.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.database.Cursor android.database.sqlite.SQLiteDatabase.query
via Stack Overflow by Ryan
, 4 months ago
Unable to start activity ComponentInfo{com.example.android.budgetcrunch/com.example.android.budgetcrunch.FragmentActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.database.Cursor
via GitHub by jjhesk
, 1 year ago
Unable to start activity ComponentInfo{****}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.loopj.android.http.AsyncHttpClient.addHeader(java.lang.String, java.lang.String)' on a null object reference
via Stack Overflow by Amir
, 1 year ago
Unable to start activity ComponentInfo{com.example.root.notebook/com.example.root.notebook.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.database.Cursor android.database.sqlite.SQLiteDatabase.query
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.nasimahmed.quizgame/com.example.nasimahmed.quizgame.WorldHistory}: java.lang.NullPointerException: Attempt to invoke virtual method 'long android.database.sqlite.SQLiteDatabase.insert(java.lang.String, java.lang.String, android.content.ContentValues)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)

Users with the same issue

429 times, 1 year ago
50 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 10 months ago
Samebug visitor profile picture
Unknown user
Once, 10 months ago
210 times, 4 months ago
109 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.