android - DLLNotFoundException (e_)sqlite3 - Stack Overflow

admin2025-04-17  3

I'm exporting an Android game from Godot 4.4dev3 with SQLite and having issues getting it to work. It works on desktop. It always results in a DllNotFound error. I am only targetting arm64-v8a on the export. I have tried:

  • Using Microsoft.Data.Sqlite (this gives "System.DllNotFoundException: e_sqlite3").
  • Using SQLitePCLRaw.bundle_e_sqlite3mc (this gives "System.DllNotFoundException: e_sqlite3mc").

In all above cases I have:

  • Checked the APK contains the correct .so in the correct architecture folder (/libs/arm64-v8a).
  • Checked the .so is for that architecture (file reports it is correct).
  • Manually loaded the .so using [DllImport("e_sqlite3")] and dlopen.
  • Manually called ...Batteries_V2.Init().
  • Added READ/WRITE permissions in the Android Manifest.
  • Looped through all the process info for anything containing "sql" (it finds { Name = libsqlite.so, Size = 1343488 } which is unexpected, Godot's one perhaps?).
  • Tried different jniLib directories with the .so file copied in there.
  • Removed and re-added all dependencies.
  • Cleaned and rebuilt numerous times.
  • Checked for anything useful in LogCat (nothing other than the exceptions).

I also tried it on another Android phone, same issue. I can't see why the file is not being loaded/found. I've also:

  • Tried all flavours and combinations of SQLitePCLRaw.
  • Tried specifically using SetProvider(...sqlite3) instead of the default e_sqlite3 (to closer match the name seen in available assemblies).
  • Tried including the SQLite AAR from the SQLite site (continual issues with the Gradle build).
  • Done an ls on the project directory when it's running and I see the PCL DLLs, as expected.

I'm exporting an Android game from Godot 4.4dev3 with SQLite and having issues getting it to work. It works on desktop. It always results in a DllNotFound error. I am only targetting arm64-v8a on the export. I have tried:

  • Using Microsoft.Data.Sqlite (this gives "System.DllNotFoundException: e_sqlite3").
  • Using SQLitePCLRaw.bundle_e_sqlite3mc (this gives "System.DllNotFoundException: e_sqlite3mc").

In all above cases I have:

  • Checked the APK contains the correct .so in the correct architecture folder (/libs/arm64-v8a).
  • Checked the .so is for that architecture (file reports it is correct).
  • Manually loaded the .so using [DllImport("e_sqlite3")] and dlopen.
  • Manually called ...Batteries_V2.Init().
  • Added READ/WRITE permissions in the Android Manifest.
  • Looped through all the process info for anything containing "sql" (it finds { Name = libsqlite.so, Size = 1343488 } which is unexpected, Godot's one perhaps?).
  • Tried different jniLib directories with the .so file copied in there.
  • Removed and re-added all dependencies.
  • Cleaned and rebuilt numerous times.
  • Checked for anything useful in LogCat (nothing other than the exceptions).

I also tried it on another Android phone, same issue. I can't see why the file is not being loaded/found. I've also:

  • Tried all flavours and combinations of SQLitePCLRaw.
  • Tried specifically using SetProvider(...sqlite3) instead of the default e_sqlite3 (to closer match the name seen in available assemblies).
  • Tried including the SQLite AAR from the SQLite site (continual issues with the Gradle build).
  • Done an ls on the project directory when it's running and I see the PCL DLLs, as expected.
Share Improve this question edited Feb 5 at 16:40 user4157124 2,99614 gold badges31 silver badges46 bronze badges asked Jan 30 at 20:39 Martin LyneMartin Lyne 3,0852 gold badges23 silver badges29 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 0

Moved to LiteDB and it works instantly.

转载请注明原文地址:http://anycun.com/QandA/1744891380a89091.html