Repository navigation
|
I have a Xamarin.Android class library which I used to build to a .dll and import into my Xamarin project. However changing to MAUI I am now converting the class libraries to MAUI as well. Inside these class libraries I have some different native android libraries (.so files) inside their respective ABI's. When building the .dll they used to get embedded inside the .dll when using the NativeAndroidLibrary build action. But now it seems like they are packaged in a .aar package instead and put beside the built .dll. Is there a way for me to embed the library files in the .dll, such that I don't have to supply the .aar as well? If not, what are my options? I could the libraries in my MAUI app directly, or can I simply consume the AAR file in the MAUI app as well? |
Replies: 3 comments 2 replies
|
Running into this issue as well. Did you ever figure this out? |
|
I am closing this discussion, please see the answer in @nathenxbrewer comment reply. |
|
I don't know how to bind an aar, can you help me? |
@nathenxbrewer Yeah kind of - I had to simply make sure to import the relevant .so files in my main solution as
<AndroidNativeLibrary>following the ABI scheme, so:That did the trick for me. You might also be able to import the build AAR file as an
AndroidLibraryinstead, making sure to setBind="False", with the prerequisite that you did the binding in the other project already and just want the library. But I have not tested that.