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

Samebug tips

  1. ,
    Expert tip

    activity.OnCreate is executed every time the app launches or the screen is rotated, so, putting your DB initialization inside it will cause the DB to be called too many times causing the exception. Try to use the MyDatabase.onCreate method for this.

Solutions on the web

via Google Groups by Chie Paliza, 1 year ago
Foreign Key Violation (code 19)
via GitHub by xtj-9182
, 1 year ago
UNIQUE constraint failed: capitulos.path (code 2067)
via Stack Overflow by hashim
, 1 year ago
UNIQUE constraint failed: context.context_id (code 2067)
via Stack Overflow by Alexia White
, 1 year ago
UNIQUE constraint failed: context.context_id (code 2067)
via Stack Overflow by Tony
, 1 year ago
PRIMARY KEY must be unique (code 19)
via Stack Overflow by seon
, 1 year ago
UNIQUE constraint failed: bookmark.Id (code 1555)
android.database.sqlite.SQLiteConstraintException: Foreign Key Violation (code 19)	at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)	at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:775)	at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)	at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)	at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1469)	at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1339)	at com.example.maecea.ipon2.DataBaseHandler.addallowance(DataBaseHandler.java:143)	at com.example.maecea.ipon2.TypeWeekly.OnProceedMonthlyClick(TypeWeekly.java:40)	at java.lang.reflect.Method.invokeNative(Native Method)	at java.lang.reflect.Method.invoke(Method.java:511)	at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:288)	at android.view.View.performClick(View.java:4084)	at android.view.View$PerformClick.run(View.java:16966)	at android.os.Handler.handleCallback(Handler.java:615)	at android.os.Handler.dispatchMessage(Handler.java:92)	at android.os.Looper.loop(Looper.java:137)	at android.app.ActivityThread.main(ActivityThread.java:4745)	at java.lang.reflect.Method.invokeNative(Native Method)	at java.lang.reflect.Method.invoke(Method.java:511)	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)	at dalvik.system.NativeStart.main(Native Method)