Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 11781

Import .so file into MAUI

$
0
0

I tried several ways to import a .so file into my project in Maui, in all cases it gives the error:

System.EntryPointNotFoundException: 'nativeCreateCamera'

This is a code example i am trying to import:

public class NativeLibs {  private const string Library = "libmlcamera-2.5.so";  private long mNativePtr = nativeCreateCamera(); // The error occurs here  [DllImport(Library, EntryPoint = "nativeCreateCamera", CallingConvention = CallingConvention.Cdecl)]  private static extern long nativeCreateCamera(); }

I have imported the .so files in Platforms/Android/Resources/lib/arm.../libmlcamera-2.5.so

Also i have instanciated in csproj

<ItemGroup><EmbeddedNativeLibrary Include="Platforms/Android/Resources/lib/arm64-v8a/libmlcamera-2.5.so"/><EmbeddedNativeLibrary Include="Platforms/Android/Resources/lib/armeabi-v7a/libmlcamera-2.5.so"/></ItemGroup>

What i am doing wrong?


Viewing all articles
Browse latest Browse all 11781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>