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)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Android.Doubts
, 1 year ago
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)
via GitHub by squiggie
, 1 year ago
Unable to start activity ComponentInfo{com.flaredown.flaredownApp.DEBUG/com.flaredown.flaredownApp.Main.MainActivity}: java.lang.IllegalArgumentException: No view found for id 0x7f0e008e (com.flaredown.flaredownApp.DEBUG:id/fl_checkin_summary) for fragment CheckInSummaryFragment{f984a6d #1 id=0x7f0e008e}
via Stack Overflow by Olexii Muraviov
, 1 year ago
Unable to start activity ComponentInfo{olexiimuraviov.ua.simplerssreader/olexiimuraviov.ua.simplerssreader.ui.FeedsActivity}: java.lang.IllegalArgumentException: No view found for id 0x7f0d0051 (olexiimuraviov.ua.simplerssreader:id/subnodes_fragment_container) for fragment SubNodesFragment{4c8915a #1 id=0x7f0d0051 subnodes fragment}
via Stack Overflow by Clement Ong
, 2 months ago
Unable to start activity ComponentInfo{com.parse.starter/com.parse.starter.baseMain}: android.content.res.Resources$NotFoundException: Resource ID #0x0
via GitHub by ajaysaini-sgvu
, 3 months ago
Unable to start activity ComponentInfo{com.williamsro.fourthdemo/com.williamsro.fourthdemo.MainActivity}: android.database.sqlite.SQLiteException: near "org": syntax error (code 1): , while compiling: CREATE TABLE IF NOT EXISTS `Person`(id INTEGER PRIMARY KEY org.jetbrains.anko.db.SqlTypeModifierImpl@7d0b905, person_name TEXT, domain TEXT, mobile_number REAL);
via Stack Overflow by Williams
, 7 months ago
Unable to start activity ComponentInfo{com.williamsro.fourthdemo/com.williamsro.fourthdemo.MainActivity}: android.database.sqlite.SQLiteException: near "org": syntax error (code 1): , while compiling: CREATE TABLE IF NOT EXISTS `Person`(id INTEGER PRIMARY KEY org.jetbrains.anko.db.SqlTypeModifierImpl@7d0b905, person_name TEXT, domain TEXT, mobile_number REAL);
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)

Users with the same issue

66 times, 4 weeks ago
Once, 2 months ago
33 times, 3 months ago
8 times, 3 months ago
468 times, 4 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.