Closed itinance closed 4 years ago
Apparently this issue is not only related to React Native and its gradle-files, but a common issue nowadays according to StackOverflow, like this: https://stackoverflow.com/questions/58751549/unable-to-load-libmain-so-in-android-studio-and-unity-as-library
Confirm that problem, can't find solution
Found it. Bevor building for Android, we need to adjust some settings in "Player Settings" in order to make ARM64 Bit available:
If you run into an Error like "NDK not found", ensure that Unity has downloaded and installed its own copy of NDK:
Having all this in mind will enable us to link against these libraries without failing to find "libmain.so"
It works, thanks
Found it. Bevor building for Android, we need to adjust some settings in "Player Settings" in order to make ARM64 Bit available:
- Switching "Scripting Backend" from Mono to ILCPP, which enables us to:
- Select "ARM64" under Target Architectures
If you run into an Error like "NDK not found", ensure that Unity has downloaded and installed its own copy of NDK:
Having all this in mind will enable us to link against these libraries without failing to find "libmain.so"
While everything works fine with React Native below any version under 0.60, on Android the application will crash upon activating the UnityView with RN > 0.60.
The final error happens because of a "libmain.so" could not be loaded:
According to a crash-report in the official Unity-Forum, we took care to use the same settings in both
build.gradle
for ndk-abiFilter:but it won't fix the issue. There is a big chance that the issues https://github.com/f111fei/react-native-unity-view/issues/120 and https://github.com/f111fei/react-native-unity-view/issues/129 might be related to this one.
Anybody found a proper solution for this?