How to get Android (emulator) to load a native dependency that ships with a C# (Avalonia) app?

15 Views Asked by At

Given a new C# Avalonia solution in Visual Studio, with a PackageReference that brings in a native dependency, how can the Android app be made to find and load that native dependency? The referenced nuget package utilizes the runtimes\android-x64\native folder for its native lib*.so library, and msbuild seems to recognize it and copy it into the .apk folder that presumably gets distributed to the Android emulator. So why then do I get a runtime exception saying the library cannot be found?

Minimal repro with issue describing the problem here:  https://github.com/AArnott/Avalonia-WithNativeDependency/issues/1

0

There are 0 best solutions below