-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility Fixes for Unity 2021 and Above in Flutter Unity Widget Plugin #903
Comments
|
1-2. Thank you for response :),
|
I got a number 3 problem. is there any solution? I tested two smart phone (samsung galaxy a32 and s7). I think this issue is related with android os version. |
@timbotimbo |
to prevent older android phones from crashing while looking for this method juicycleff#903
I just got issue 3 It happend on an android 7 device, and not on Android 9 and 13. Now that I can reproduce it, i'll test if your proposed fix is enough or if we need to actually do something with this function. |
I made a new issue for number 3, because the fix doesn't seem as simple as the workaround mentioned here. |
Solutions Implemented for Compatibility with Unity 2021 and Higher Versions:
Issue: Execution failed for task ':unityLibrary:BuildIl2CppTask'.
Solution: In the
unityLibrary/build.gradle
file, comment out the following line:Issue: NoSuchFieldError - No "Ljava/lang/Object;" field "mUnityPlayer" in class "Lcom/example/app/MainActivity;" or its superclasses.
Solution: Refer to the comment in this GitHub issue for a potential fix: Flutter Unity Widget Issue #836 Comment
Issue: E/AndroidRuntime(14114): java.lang.NoSuchMethodError: no non-static method "Lcom/xraph/plugin/flutter_unity_widget/CustomUnityPlayer;.hidePreservedContent()V"
Solution: In the library directory
flutter-unity-view-widget
, modify the fileflutter-unity-view-widget\android\src\main\kotlin\com\xraph\plugin\flutter_unity_widget\CustomUnityPlayer.kt
by adding the following method to theCustomUnityPlayer
class:If Unity is still not displayed after the above steps:
useAndroidViewSurface
parameter totrue
in your UnityWidget widget:These solutions are intended to address compatibility issues encountered with Unity 2021 and higher versions when integrating with the Flutter Unity Widget plugin.
The text was updated successfully, but these errors were encountered: