It looks like you just set the wrong arguments for the function.
The SDK has the following definitions:
public static SQLiteDatabase openOrCreateDatabase (String path, SQLiteDatabase.CursorFactory factory, DatabaseErrorHandler errorHandler) public static SQLiteDatabase openOrCreateDatabase (String path, SQLiteDatabase.CursorFactory factory) public static SQLiteDatabase openOrCreateDatabase (File file, SQLiteDatabase.CursorFactory factory)
But your call to this function is incorrect.
Perhaps you wanted to call openDatabase (String path, SQLiteDatabase.CursorFactory factory, int flags) ?
In this case, you just set the arguments in the wrong order - you do
openOrCreateDatabase("sudoku.db", Context.MODE_PRIVATE, null);
instead:
openDatabase("sudoku.db", null, Context.MODE_PRIVATE);
a4vi2r
source share