libsqlite3.so not found
I've got a nice-looking app running on macOS and iOS, but I am having a whole lot of difficulty with the Android version: I'm getting this error:
Invalid argument(s): Failed to load dynamic library
'/data/data/com.example.great_app_v1/lib/libsqlite3.so': dlopen
failed: library
"/data/data/com.example.great_app_v1/lib/libsqlite3.so" not found
My dependencies are: flutter: sdk: flutter sqlite3: ^1.4.0
I also tried these dependencies:
dependencies: flutter: sdk: flutter sqlite3: ^1.4.0 provider: ^6.0.0
cupertino_icons: ^1.0.2 fl_chart: ^0.40.6 sqlite3_flutter_libs: ^0.5.2
import 'package:sqlite3_flutter_libs/sqlite3_flutter_libs.dart'
But then I get this error: SqliteException(14): bad parameter or other API misuse, bad parameter or other API misuse (code 21)
Ah, it might be because it can't find the location of the .sqlite file itself. I'll keep digging ...
Depending on sqlite3_flutter_libs should be enough.
If you get SqliteException(14): bad parameter or other API misuse, bad parameter or other API misuse (code 21), sqlite3 has already been loaded successfully - it's just throwing an exception. Can you post the trace of that exception? If it happens when creating a new database file, it might be that the parent directory doesn't exist? (You need to create it with dart:io first).
I just had this issue on android 14, were you using sqlcipher_flutter_libs? I removed cypher to resolve it, but I wanted cypher back.