0

I am writing a DatabaseHelper code when this error came.

public class DatabaseHelper extends SQLiteOpenHelper {

private static final String DB_NAME = "Items.db";
private static final String DB_TABLE = "Items_Table";

private static final String DB_TABLE1 = "Items_Table1";
private static final String NAME = "NAME";
private static final String ID = "ID";
private static final String ID1 = "ID1";
private static final String PLACE = "PLACE";



private static final String CREATE_TABLE = "CREATE TABLE " +      DB_TABLE + " (" + ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + NAME
        + " TEXT " + ")";
private static final String CREATE_TABLE1 = "CREATE TABLE " + DB_TABLE1 + " (" + ID1 + " INTEGER PRIMARY KEY AUTOINCREMENT, "+
        PLACE + " TEXT " + " , " + ID + " INTEGER REFERENCES " + DB_TABLE + ")";



public  DatabaseHelper(Context context)
{

    super(context,DB_NAME,null,1);
}

public void onConfigure(SQLiteDatabase db)
{
    super.onConfigure(db);
    db.setForeignKeyConstraintsEnabled(true);
}



public void onCreate(SQLiteDatabase db)
{
    db.execSQL(CREATE_TABLE);
    db.execSQL(CREATE_TABLE1);
}

I get an Android studio error: illegal character : '\u2028'. What does this mean and how do i correct it.

sfk
  • 50
  • 5
  • Possible duplicate of [Illegal Character error: '\u200b'](https://stackoverflow.com/questions/35657620/illegal-character-error-u200b) – Ali Dec 26 '18 at 05:10

1 Answers1

0

It's the new line character, if you go to each of the lines that are causing the error and delete the 'invisible' last character then the errors will resolve

Go to end of the line that is causing the error and hit backspace once, for each of the lines that have the illegal character error

You could also use replace feature from Android Studio, put an empty string in "Replace with" in place of this illegal character.

Navidk
  • 612
  • 6
  • 14