I produced a DBTest class SQLiteOpenHelper

I Quickly known as this from the primary UI.

It crashes after i hit the DB.GetReadableDatabase () and also the log isn't any help, just states null pointer, but I'm not sure where you can look.

Everything works basically use

SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY);

Same database

This is actually the Class for that assistant and underneath the error:

   public class DBTest extends SQLiteOpenHelper {

            private static String DB_NAME = "DB";

            private SQLiteDatabase myDataBase; 

            private final Context myContext;

            public DBTest(Context context) {

                super(context,   DB_NAME, null, 1);
                this.myContext = context;

            public void onCreate(SQLiteDatabase db) {
                // TODO Auto-generated method stub


            public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
                // TODO Auto-generated method stub


Below is how the mistake happens:

public class Main extends Activity 

    DataBaseHelper db = new DataBaseHelper(null);
    static SQLiteDatabase Db;

    public void onCreate(Bundle savedInstanceState) {

        SQLiteDatabase Db;

        DBTest db1 = new DBTest(null);

        Db = db1.getReadableDatabase(); <<<  blow up here

DBTest db1 = new DBTest(this.getApplicationContext());

Context can not be null