react-native-unity-demo | This is a demo project for react-native-unity | Plugin library
kandi X-RAY | react-native-unity-demo Summary
kandi X-RAY | react-native-unity-demo Summary
This is a demo project for react-native-unity.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-native-unity-demo
react-native-unity-demo Key Features
react-native-unity-demo Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-unity-demo
QUESTION
We have a ReactNative application that has integrated Unity based on react-native-unity-view successfully as a library for quite a long time. However, after most recent updates on ReactNative regarding AndroidX and latest SDK-changes, we're running into the issue "libmain.so not found". This exception happens on the very first attempt to display a Unity-View.
There is a similar issue on SO, please don't mark as duplicate as our approach might be different and particulary since we give many many more details here.
There is a running and still working example on GitHub (based on ReactNative 0.57): https://github.com/f111fei/react-native-unity-demo. As long as this project is based on ReactNative 0.57 and its appropriate gradle-settings, everything works fine. But as soon as we upgrade to the latest ReactNative version (and even 0.60 for example), which gives us an android-folder that is very different against to the older one), the issue happens with a crash of the application. (We also tried to set up everything from scratch to exclude the possibility that this issue was due to upgrades. With RN 0.57 everything still works fine, with RN 0.60 and above not)
The exception is as follows:
...ANSWER
Answered 2019-Nov-21 at 16:33I can answer by myself now. The issue was caused by Unity export that was not ARM64-compatible unless several settings were applied manually. Here is how:
Bevor building for Android, we need to adjust some settings in "Player Settings" in order to make ARM64 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" while building, 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".
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-unity-demo
Open unity/Cube/Assets/test.unity
Click Build => Export Android or Export IOS
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page