azesmway/react-native-unity

Unity view failed to initialize, failed to load libmain.so

Opened this issue · 4 comments

Hello guys and gals,

we are trying to integrate the Unity app into the RN project, and we're using the example from this repository.

However we get stuck with this screen when Unity view loads up:

issuelibman

We have also tried almost every piece of advice from this link:

https://forum.unity.com/threads/app-not-working-on-some-devices-failed-to-load-libmain-so.1031137/

But it did not help.

We are using RN "react-native": "^0.67.3", and have tried with various Unity versions, 2021.1.19, 2021.3.13, 2020.3.37, but it still does not work. Can you please help us out? Thank you in advance!

Hello!
Only works on real devices

Hello @azesmway, thank you very much for your help. This is an Android build that we are trying out, and in the readme it says that Android builds can run in the simulator. So, just to clarify, both Android and iOS builds should be tested on real devices only? Thanks.

I've had the same issue. I also tried adding:

    packagingOptions {
        exclude "lib/armeabi/libbitmaps.so"
        exclude "lib/armeabi/libgifimage.so"
        exclude "lib/armeabi/libimagepipeline.so"
        exclude "lib/armeabi/libmemchunk.so"
        exclude "lib/armeabi/libwebp.so"
        exclude "lib/armeabi/libwebpimage.so"
        exclude "lib/arm64-v8a/libbitmaps.so"
        exclude "lib/arm64-v8a/libgifimage.so"
        exclude "lib/arm64-v8a/libimagepipeline.so"
        exclude "lib/arm64-v8a/libmemchunk.so"
        exclude "lib/arm64-v8a/libwebp.so"
        exclude "lib/arm64-v8a/libwebpimage.so"
        exclude "lib/x86_64/libbitmaps.so"
        exclude "lib/x86_64/libgifimage.so"
        exclude "lib/x86_64/libimagepipeline.so"
        exclude "lib/x86_64/libmemchunk.so"
        exclude "lib/x86_64/libwebp.so"
        exclude "lib/x86_64/libwebpimage.so"
    }   

to android/app/build.grandle under android section as suggested here https://stackoverflow.com/questions/38529767/unity-android-project-throws-your-hardware-does-not-support-this-application-so

Unfortunately it didn't work. Does anyone have any other suggestions?

@stadarz have you check the player setting on Unity?