-
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? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Running into this issue as well. Did you ever figure this out? |
Beta Was this translation helpful? Give feedback.
-
I am closing this discussion, please see the answer in @nathenxbrewer comment reply. |
Beta Was this translation helpful? Give feedback.
@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
AndroidLibrary
instead, 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.