Hey! I've been trying to build the app locally (parts of which led to #15) but there is one issue that I haven't been able to resolve yet and you might be able to help me with this.
Whenever I run the app (the version I've built myself) on my smartphone (or an Android emulator) I get the following exception:
Unhandled Exception:
DatabaseException(no such table: Kanji (code 1 SQLITE_ERROR): ,
while compiling: SELECT * FROM Kanji) sql 'SELECT * FROM Kanji' args []}
After checking the local database that gets installed on my device I can confirm that its pretty much empty (like a newly initialized sqlite DB) so this error is kinda obvious. My first thought was something along the lines of "Oh well, maybe I did something wrong with the git LFS step" but sadly the database that I have on my PC in data/dictDB.db is correct (as in it does have the required tables/data). So my assumption is that somehow it doesn't seem to copy the SQLite database that I have in data/ to my device (nor the emulator) and I think it does instead initialize a new one, which then causes the prior exception due to the data not being present.
Full "flutter run -d DEVICE_NAME" log (click to expand)
Launching lib\main.dart on DEVICE_NAME in debug mode...
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 62.5s
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk... 13.5s
I/flutter (30066): copying
I/flutter (30066): opening
I/flutter (30066): upgrading
I/flutter (30066): [{type: table, name: android_metadata, tbl_name: android_meta
data, rootpage: 3, sql: CREATE TABLE android_metadata (locale TEXT)}]
E/flutter (30066): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Except
ion: DatabaseException(no such table: Kanji (code 1 SQLITE_ERROR): , while compi
ling: SELECT * FROM Kanji) sql 'SELECT * FROM Kanji' args []}
E/flutter (30066): #0 wrapDatabaseException (package:sqflite/src/exception_
impl.dart:11:7)
E/flutter (30066): <asynchronous suspension>
E/flutter (30066): #1 SqfliteDatabaseMixin.txnRawQuery.<anonymous closure>
(package:sqflite_common/src/database_mixin.dart:406:30)
E/flutter (30066): <asynchronous suspension>
E/flutter (30066): #2 BasicLock.synchronized (package:synchronized/src/basi
c_lock.dart:33:16)
E/flutter (30066): <asynchronous suspension>
E/flutter (30066): #3 SqfliteDatabaseMixin.txnSynchronized (package:sqflite
_common/src/database_mixin.dart:346:14)
E/flutter (30066): <asynchronous suspension>
E/flutter (30066): #4 DBProvider.getAllKanjis (package:kanji_dictionary/res
ource/db_provider.dart:131:15)
E/flutter (30066): <asynchronous suspension>
E/flutter (30066): #5 KanjiBloc.getAllKanjis.<anonymous closure> (package:k
anji_dictionary/bloc/kanji_bloc.dart)
E/flutter (30066): <asynchronous suspension>
E/flutter (30066):
I/flutter (30066): opening
E/flutter (30066): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Except
ion: DatabaseException(no such table: Kanji (code 1 SQLITE_ERROR): , while compi
ling: SELECT * FROM Kanji) sql 'SELECT * FROM Kanji' args []}
E/flutter (30066): #0 wrapDatabaseException (package:sqflite/src/exception_
impl.dart:11:7)
E/flutter (30066): <asynchronous suspension>
E/flutter (30066): #1 SqfliteDatabaseMixin.txnRawQuery.<anonymous closure>
(package:sqflite_common/src/database_mixin.dart:406:30)
E/flutter (30066): <asynchronous suspension>
E/flutter (30066): #2 BasicLock.synchronized (package:synchronized/src/basi
c_lock.dart:33:16)
E/flutter (30066): <asynchronous suspension>
E/flutter (30066): #3 SqfliteDatabaseMixin.txnSynchronized (package:sqflite
_common/src/database_mixin.dart:346:14)
E/flutter (30066): <asynchronous suspension>
E/flutter (30066): #4 DBProvider.getAllKanjis (package:kanji_dictionary/res
ource/db_provider.dart:131:15)
E/flutter (30066): <asynchronous suspension>
E/flutter (30066): #5 KanjiBloc.getAllKanjis.<anonymous closure> (package:k
anji_dictionary/bloc/kanji_bloc.dart)
E/flutter (30066): <asynchronous suspension>
E/flutter (30066):
Activating Dart DevTools... 7.6s
Syncing files to device DEVICE_NAME... 140ms
I've invested some time trying to figure out why this doesn't work, but sadly couldn't find a solution yet and I hope that you might know how to resolve this :).
bug