Hi all,
Context:
I’m trying to build an app on Android with React Native and using MAVSDK in it. It works like a charm if I run MAVSDK-Java client on the react app (on my device) and mavsdk_server running on a linux host. However my goal is to have both client and server on the app.
Error:
When I add mavsdk_server in my app with implementation 'io.mavsdk:mavsdk-server:0.6.0'
, it fails with the following error:
More than one file was found with OS independent path 'lib/arm64-v8a/libc++_shared.so'. If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake
Root cause:
It seems that React Native already have a libc++_shared.so
library and don’t know which one to load (supposition). I tried some solutions on React Native side but none of them work (same issue for other SDK that MAVSDK).
Fix:
None… Or at least not on React Native side. So I was wondering if I can do some adaptation with MAVSDK server. Is it possible not to have this libc++_shared.so
? I tried a build from source as well but I don’t get what I need to do with the libmavsdk_server.so generated. Do you think I could avoid the use of this libc++_shared.so
if I include the library in another way than with the .aar
library ?
This is a specific case and I don’t have the skills to figure it out alone… So if someone has an idea of what I could do to fix that problem this is more than welcome !