I have a native library (cpp) which does decoding of data into a bitmap. If I set the native library project to target ARM everything works great on non-ARM64 devices. On ARM64 devices it cannot find/load the .so file. (DLLNotFound Exception)
If I target ARM64 the reverse happens.
I have the Native Library as a project in my solution (VS2017 Enterprise) and the project is added as a reference in the main Android project.
There are other non-native libraries as well that call the functions in the native library.
I don't reference the native library in non-native ones because I get an error "Native library references target platform arm64-v8a which is not supported by this project. Configured supported ABIs are: armeabi" when building the non-native library. This seems odd and likely a clue, but I cannot find a way to specify this for a library like you can for the App project.
I am confused as to why the ARM build doesn't work for both. But regardless, what is the proper way to set this up?
Answers
@MichaelHartman
ARM and ARM64 are two different architecture, so they need two .so file to support.
You could refer to the following link for how to support different architecture:
https://docs.microsoft.com/en-us/xamarin/android/platform/native-libraries
Hi, @MichaelHartman!
I have been struggling with this problem for months, and still have not found a solution.
Now that Google is forcing everyone to support 64 bits architecture, I'm going to go 100% C#, although this is less than ideal...
The only thing I have seen is this article recently released: https://blog.xamarin.com/using-c-libraries-xamarin-forms-apps/ BUT it doesn't talk about how to produce the native libraries, which is the issue.
Did you found a solution for this?