samedi 3 janvier 2015

SQLite Constraint Exception on seemingly non-application related stuff

I am creating a database table with version 1 and call a method from onCreate method of the helper class to populate it with the data from a text file .


I am getting following errors that seemingly have got nothing to do with the table I am creating / populating.



"01-03 18:54:39.020 1932-2044/com.android.launcher E/SQLiteDatabase﹕ Error inserting name=Widget:UserHandle{0}/com.android.deskclock/com.android.alarmclock.AnalogAppWidgetProvider preview_bitmap=[B@abc8f40 size=168x115
android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: shortcut_and_widget_previews.name, shortcut_and_widget_previews.size (code 1555)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:782)
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:1471)
at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1341)
at com.android.launcher2.WidgetPreviewLoader.writeToDb(WidgetPreviewLoader.java:368)
at com.android.launcher2.WidgetPreviewLoader.access$000(WidgetPreviewLoader.java:106)
at com.android.launcher2.WidgetPreviewLoader$1.doInBackground(WidgetPreviewLoader.java:259)
at com.android.launcher2.WidgetPreviewLoader$1.doInBackground(WidgetPreviewLoader.java:257)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
01-03 18:54:39.030 1932-2002/com.android.launcher E/SQLiteDatabase﹕ Error inserting name=Shortcut:com.android.contacts/alias.DialShortcut preview_bitmap=[B@116eae79 size=168x115
android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: shortcut_and_widget_previews.name, shortcut_and_widget_previews.size (code 1555)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:782)
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:1471)
at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1341)
at com.android.launcher2.WidgetPreviewLoader.writeToDb(WidgetPreviewLoader.java:368)
at com.android.launcher2.WidgetPreviewLoader.access$000(WidgetPreviewLoader.java:106)
at com.android.launcher2.WidgetPreviewLoader$1.doInBackground(WidgetPreviewLoader.java:259)
at com.android.launcher2.WidgetPreviewLoader$1.doInBackground(WidgetPreviewLoader.java:257)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)"


In short, I am at a loss to understand



UNIQUE constraint failed: shortcut_and_widget_previews.name, shortcut_and_widget_previews.size (code 1555)


What are these wideget preview and alarm clock (first line in the dump above) stuff that are seemingly causing these problems? How to overcome these?


Aucun commentaire:

Enregistrer un commentaire