Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

android.database.sqlite.SQLiteException: no such table: BOOKS (code 1): , while compiling: SELECT * FROM BOOKS

See original GitHub issue

I get this issue when I try to start my app.

In onCreate I have this:


My manifest contains:

    android:value="books.db" />
    android:value="2" />
    android:value="true" />
    android:value="com.sample.mypackage" />

(The DOMAIN_PACKAGE_NAME was changed!!)

And my class, that extends SugerRecord has an empty contructor

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:9

github_iconTop GitHub Comments

jocodecommented, Oct 8, 2018

Instant-Run seems to prevent Sugar ORM from finding the “table” classes, therefore it cannot create the DB tables if you run the app for the first time

When running your app for the first time Turn off Instant run once to allow for the DB tables to be created You can enable it after the tables have been created.

Ref… Official Repo Sugar

larrytech7commented, Aug 15, 2016

Check that your version of the database is consistent with the changes of your model objects. Each time to make changes to your model, I think you need to update your database version in the manifest.

On Tue, Aug 9, 2016, 8:59 PM Daniel Tigse wrote:

I have this issue and I tried everything! The thing is that it occurs in some devices.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Caused by: android.database.sqlite.SQLiteException: no such ...
sqlite file(in which we have table called BOOK) and saved it into "raw" folder and then copying the file and creating the database...
Read more >
Caused by android database sqlite SQLiteException no such ...
SQLiteException : no such table generalSettings (code 1): pick ... (code 1): , while compiling: select * from generalSettings at
Read more >
Caused by: android.database.sqlite.SQLiteException: no such ...
Android : Caused by: android. database. sqlite. SQLiteException : no such table : ( code 1 ) Android [ Beautify Your Computer ...
Read more >
[Developer Preview Android P] SQLiteException: no such ...
* What was the actual result? android.database.sqlite.SQLiteException: no such table: StateProvinceDB (code 1 SQLITE_ERROR): , while compiling: SELECT DISTINCT ...
Read more >
How To Resolve Android.Database.Sqlite.Sqliteexception
SQLiteException: no such table: BOOK code 1 SQLITEERROR. ... related to Android database sqlite sqliteexception no such table code 1 while compiling insert ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found