java.lang.RuntimeException

Unable to start activity ComponentInfo{droid.dev.shg.shg/droid.dev.shg.shg.MainActivity}: android.database.sqlite.SQLiteException: near "foreign": syntax error (code 1): , while compiling: create table if not exists members(foreign key (id) REFERENCES login(id),mem_name text,mem_dob date,mem_address text,mem_phno text)

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web62178

  • Unable to start activity ComponentInfo{droid.dev.shg.shg/droid.dev.shg.shg.MainActivity}: android.database.sqlite.SQLiteException: near "foreign": syntax error (code 1): , while compiling: create table if not exists members(foreign key (id) REFERENCES login(id),mem_name text,mem_dob date,mem_address text,mem_phno text)
  • Unable to start activity ComponentInfo{com.example.wojciech.myapplication/com.example.wojciech.myapplication.nowa_g}: android.database.sqlite.SQLiteException: near "CREATE": syntax error (code 1): , while compiling: DROP TABLE IF EXISTS CREATE TABLE bazaPytan(id INTEGER PRIMARY KEY AUTOINCREMENT,question TEXT,choice1 TEXT, choice2 TEXT, choice3 TEXT, answer TEXT);
  • via tagwith.com by Unknown author, 1 year ago
    Unable to start activity ComponentInfo{com.myapplication/com.myapplication.MyActivity}: android.database.sqlite.SQLiteException: near "Details": syntax error (code 1): , while compiling: CREATE TABLE Activities Details(id INTEGER FOREIGN KEY
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{droid.dev.shg.shg/droid.dev.shg.shg.MainActivity}: android.database.sqlite.SQLiteException: near "foreign": syntax error (code 1): , while compiling: create table if not exists members(foreign key (id) REFERENCES login(id),mem_name text,mem_dob date,mem_address text,mem_phno text) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2584) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2666) at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4336)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    3 times, 2 weeks ago
    4 times, 2 weeks ago
    8 times, 2 months ago
    6 times, 6 months ago
    19 times, 6 months ago
    101 more bugmates