godotengine / godotengine/godot
Android build of C# project doesn’t include native libraries from NuGet packages (probably iOS also?)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
Tested versions
Godot 4.3 (but probably in all 4.x)
System information
Android
Issue description
It appears that the Android (and iOS?) build of my C# project does not include some native libraries from NuGet packages. Specifically, the SQLite.NET package, which includes native Android *.so libraries, is not being included in the build. According to the official .NET documentation, these libraries should be included (SQLite.NET Documentation).
E 0:00:01:0671 :0 @ (): System.TypeInitializationException: The type initializer for 'SQLite.SQLiteConnection' threw an exception. ---> System.DllNotFoundException: e_sqlite3
<C++ Error> System.TypeInitializationException
<C++ Source> :0
<Stack Trace> :0 @ ()
:0 @ ()
:0 @ int SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
:0 @ void SQLitePCL.raw.SetProvider(SQLitePCL.ISQLite3Provider)
:0 @ void SQLitePCL.Batteries_V2.Init()
:0 @ SQLite.SQLiteConnection..cctor()
:0 @ --- End of inner exception stack trace ---()
:0 @ ()
:0 @ void SqLite._Ready()
:0 @ bool Godot.Node.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
:0 @ bool SqLite.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
:0 @ Godot.NativeInterop.godot_bool Godot.Bridge.CSharpInstanceBridge.Call(nint, Godot.NativeInterop.godot_string_name*, Godot.NativeInterop.godot_variant**, int, Godot.NativeInterop.godot_variant_call_error*, Godot.NativeInterop.godot_variant*)
Steps to reproduce
- Create a new C# project targeting Android.
- Add the SQLite.NET NuGet package to the project.
- Write some code to use "SQLite.NET"
- Build the project targeting Android (or iOS) with "Deploy with Remote Debug" enabled.
Minimal reproduction project (MRP)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked cs_libs.zip minimal reproduction and reproduce the Android C# export with SQLite.NET and remote debugging enabled. Inspect the generated Android build to determine whether the NuGet native e_sqlite3 libraries are packaged; done means the reproduction loads SQLite.SQLiteConnection without a DllNotFoundException, with iOS behavior checked if applicable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp, ios
- Domain
- build-system, game-dev, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100