android.database.sqlite.SQLiteException: near "TEXT": syntax error (code 1): , while compiling: CREATE TABLE contacts ( Id INTEGER PRIMARY KEY, Name TEXT NOT NULL, PhoneNumber TEXT, Email TEXT ################################################################# Error Code : 1 (SQLITE_ERROR) Caused By : SQL(query) error or missing database. (near "TEXT": syntax error (code 1): , while compiling: CREATE TABLE contacts ( Id INTEGER PRIMARY KEY, Name TEXT NOT NULL, PhoneNumber TEXT, Email TEXT) #################################################################

Stack Overflow | muchie | 3 months ago
  1. 0

    App Unfortunately Stopped. Can't find the error

    Stack Overflow | 3 months ago | muchie
    android.database.sqlite.SQLiteException: near "TEXT": syntax error (code 1): , while compiling: CREATE TABLE contacts ( Id INTEGER PRIMARY KEY, Name TEXT NOT NULL, PhoneNumber TEXT, Email TEXT ################################################################# Error Code : 1 (SQLITE_ERROR) Caused By : SQL(query) error or missing database. (near "TEXT": syntax error (code 1): , while compiling: CREATE TABLE contacts ( Id INTEGER PRIMARY KEY, Name TEXT NOT NULL, PhoneNumber TEXT, Email TEXT) #################################################################
  2. 0

    SQLiteDatabase Crashing my app not displaying information

    Stack Overflow | 8 months ago | user6079154
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.treycoco.calorietracker/com.example.treycoco.calorietracker.appMain}: android.database.sqlite.SQLiteException: near ")": syntax error (code 1): , while compiling: create table Calorie_Info (_id integer primary key autoincrement, Description text not null, Calories integer not null, ); ################################################################# Error Code : 1 (SQLITE_ERROR) Caused By : SQL(query) error or missing database. (near ")": syntax error (code 1): , while compiling: create table Calorie_Info (_id integer primary key autoincrement, Description text not null, Calories integer not null, );) #################################################################
  3. 0

    Caused By : SQL(query) error or missing database

    Stack Overflow | 6 days ago | Omar
    android.database.sqlite.SQLiteException: near "TABLESunday": syntax error (code 1): , while compiling: CREATE TABLESunday(_session INTEGER PRIMARY KEY AUTOINCREMENT,_name TEXT,_length INTEGER); ################################################################# Error Code : 1 (SQLITE_ERROR) Caused By : SQL(query) error or missing database. (near "TABLESunday": syntax error (code 1): , while compiling: CREATE TABLESunday(_session INTEGER PRIMARY KEY AUTOINCREMENT,_name TEXT,_length INTEGER);) #################################################################
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Android sqlLite create table

    Stack Overflow | 4 years ago | Victor Kiricheiko
    java.lang.RuntimeException: Unable to create application com.activeandroid.app.Application: android.database.sqlite.SQLiteException: duplicate column name: id: CREATE TABLE IF NOT EXISTS Quote (Id INTEGER PRIMARY KEY AUTOINCREMENT, author TEXT, id INTEGER, text TEXT);
  6. 0

    android.database.sqlite.SQLiteException: duplicate column name: bookmark (code 1): , while compiling: ALTER TABLE draft_messages ADD COLUMN bookmark VARCHAR

    GitHub | 3 years ago | 2fast2fourier
    android.database.sqlite.SQLiteException: duplicate column name: bookmark (code 1): , while compiling: ALTER TABLE draft_messages ADD COLUMN bookmark VARCHAR
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. android.database.sqlite.SQLiteException

    near "TEXT": syntax error (code 1): , while compiling: CREATE TABLE contacts ( Id INTEGER PRIMARY KEY, Name TEXT NOT NULL, PhoneNumber TEXT, Email TEXT ################################################################# Error Code : 1 (SQLITE_ERROR) Caused By : SQL(query) error or missing database. (near "TEXT": syntax error (code 1): , while compiling: CREATE TABLE contacts ( Id INTEGER PRIMARY KEY, Name TEXT NOT NULL, PhoneNumber TEXT, Email TEXT) #################################################################

    at android.database.sqlite.SQLiteConnection.nativePrepareStatement()
  2. Android Platform
    SQLiteDatabase.execSQL
    1. android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
    2. android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1058)
    3. android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:623)
    4. android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
    5. android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:59)
    6. android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
    7. android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1812)
    8. android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1743)
    8 frames
  3. com.example.useraccountname
    ContactDAO.onCreate
    1. com.example.useraccountname.contacts_app.ContactDAO.onCreate(ContactDAO.java:19)
    1 frame
  4. Android Platform
    SQLiteOpenHelper.getWritableDatabase
    1. android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:251)
    2. android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
    2 frames
  5. com.example.useraccountname
    add_contacts.onOptionsItemSelected
    1. com.example.useraccountname.contacts_app.ContactDAO.insert(ContactDAO.java:31)
    2. com.example.useraccountname.contacts_app.add_contacts.onOptionsItemSelected(add_contacts.java:40)
    2 frames
  6. Android Platform
    Activity.onMenuItemSelected
    1. android.app.Activity.onMenuItemSelected(Activity.java:3205)
    1 frame
  7. Android Support v4
    FragmentActivity.onMenuItemSelected
    1. android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:403)
    1 frame
  8. Android v7
    AppCompatDelegateImplV7.onMenuItemSelected
    1. android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:189)
    2. android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:100)
    3. android.support.v7.app.AppCompatDelegateImplV7.onMenuItemSelected(AppCompatDelegateImplV7.java:663)
    3 frames
  9. android.support.v7
    MenuBuilder.performItemAction
    1. android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:811)
    2. android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152)
    3. android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:958)
    4. android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:948)
    4 frames
  10. Android v7
    ActionMenuView.invokeItem
    1. android.support.v7.widget.ActionMenuView.invokeItem(ActionMenuView.java:618)
    1 frame
  11. android.support.v7
    ActionMenuItemView.onClick
    1. android.support.v7.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:139)
    1 frame
  12. Android Platform
    ActivityThread.main
    1. android.view.View.performClick(View.java:5698)
    2. android.widget.TextView.performClick(TextView.java:10846)
    3. android.view.View$PerformClick.run(View.java:22565)
    4. android.os.Handler.handleCallback(Handler.java:739)
    5. android.os.Handler.dispatchMessage(Handler.java:95)
    6. android.os.Looper.loop(Looper.java:158)
    7. android.app.ActivityThread.main(ActivityThread.java:7230)
    7 frames
  13. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    1 frame
  14. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
    2 frames