Closed xiaohai-huang closed 2 days ago
Based on the git history, I guess you forgot to update the Android's yoga to the latest version (3.1.0) like the rest of the platforms.
yoga binary for Android is also on 3.1.0. The change was done after 3.1.0.
I think the issue is with Unity 6, as it was working with other versions of Unity when I tried it before.
I hadn't started updating the package for Unity 6 so far. But I will start looking into it, as there seems to be other issues related to Unity 6.
I tested this in Unity 6 and can't reproduce it.
I suspect your issue might be caused by Code Stripping. You can try to lower code stripping level. Start from "Disabled" and increase it gradually to find out where it fails.
@KurtGokhan I am using IL2CPP scripting backend. It cannot be configured as disabled
. I have set the Managed Stripping Level
to Minimal
. Can you test building the Android apk with IL2CPP scripting backend?
I am able to get rid of the errors by disabling Minify release in Publishing Settings.
I just found that out too. For some reason minifying the build breaks the Yoga package. I will look into why that happens more thoroughly later. For now the minifying must be disabled.
I tested it in your project and that takes your APK size from 61 MB to 66 MB, which is not a huge difference. But ideally ReactUnity shouldn't break build when the Minify is turned on.
If you want to keep Minify enabled, the solution is to enable Custom Proguard File
in the Project settings and add this code to the proguard file:
-keep class com.facebook.yoga.** { *; }
I truly appreciate your assistance, @KurtGokhan Thank you for dedicating your valuable time to debugging the issue and testing my project. Your kindness means the world to me. I think I should reopen the issue as this solution needs to be documented.
Added doc here.
My Android build crashes with the following error message.
The windows x64 build works without any error.
Builder Info
Unity Editor Version: 6000.0.13f1
Repository
https://github.com/xiaohai-huang/mini-rpg/tree/master