java.lang.NullPointerException: Attempt to invoke virtual method 'android.database.Cursor android.database.sqlite.SQLiteDatabase.rawQuery(java.lang.String, java.lang.String[])' on a null object reference

Stack Overflow | nick | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Getting Null object reference in android sqlite

    Stack Overflow | 8 months ago | nick
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.database.Cursor android.database.sqlite.SQLiteDatabase.rawQuery(java.lang.String, java.lang.String[])' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'android.database.Cursor android.database.sqlite.SQLiteDatabase.rawQuery(java.lang.String, java.lang.String[])' on a null object reference

      at nidhinkumar.gridcam.logindetails.Profileeditpage.getAllSchools()
    2. nidhinkumar.gridcam.logindetails
      Profileeditpage.onCreate
      1. nidhinkumar.gridcam.logindetails.Profileeditpage.getAllSchools(Profileeditpage.java:104)
      2. nidhinkumar.gridcam.logindetails.Profileeditpage.onCreate(Profileeditpage.java:63)
      2 frames
    3. Android Platform
      ActivityThread.performLaunchActivity
      1. android.app.Activity.performCreate(Activity.java:6092)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2468)
      3 frames