android.database.sqlite.SQLiteException: no such table: BOOKS (code 1): , while compiling: SELECT * FROM BOOKS
See original GitHub issueI get this issue when I try to start my app.
In onCreate
I have this:
SugarContext.init(this);
My manifest contains:
<meta-data
android:name="DATABASE"
android:value="books.db" />
<meta-data
android:name="VERSION"
android:value="2" />
<meta-data
android:name="QUERY_LOG"
android:value="true" />
<meta-data
android:name="DOMAIN_PACKAGE_NAME"
android:value="com.sample.mypackage" />
(The DOMAIN_PACKAGE_NAME was changed!!)
And my class, that extends SugerRecord has an empty contructor
Issue Analytics
- State:
- Created 7 years ago
- Comments:9
Top 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 android.app.
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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
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 notifications@github.com wrote: