Android Studio flagging error in SQLite pragma command, <pragma value> expected, got 'ON' Android Studio flagging error in SQLite pragma command, <pragma value> expected, got 'ON' sqlite sqlite

Android Studio flagging error in SQLite pragma command, <pragma value> expected, got 'ON'


Using the signed integer alternative syntax worked.

private static void setForeignKeyConstraintsEnabled(@NonNull SQLiteDatabase db) {    if (!db.isReadOnly()) {        db.execSQL("PRAGMA foreign_keys=1;");    }}private static void setForeignKeyConstraintsDisabled(@NonNull SQLiteDatabase db) {    if (!db.isReadOnly()) {        db.execSQL("PRAGMA foreign_keys=0;");    }}

Interestingly, using the alternative syntax of yes/no flagged an error on no but not yes. I agree with @CommonsWare that this seems to be a lint bug.