Open chetu-ko opened 1 week ago
Flutter: 3.19.2 Gradle: Distribution URL: Distribution https://services.gradle.org/distributions/gradle-7.6-bin.zip Classpath: classpath 'com.android.tools.build:gradle:7.3.1' Kotlin Version: ext.kotlin_version = '1.9.0' Unity: 2023.2.20f minSdkVersion: 26 targetSdkVersion: 34
Are you using the useAndroidViewSurface
(true or false) parameter in the UnityWidget?
I'm asking because Flutter 3.19 has invisibility and transition/resize issues when this param is false.
If you are not using AR, using Flutter 3.22+ will help in preventing a lot of small issues.
Can you replicate this with the example project? Just to check if it is anything specific to your dart code or not.
I am using flutter version 3.19 and android > 10 which is 14 I an using.
Hi @timbotimbo I am now getting a different error, I am using Android> 10, and I upgraded my Flutter version to 3.24 to the recent version, This time not even the Flutter build is completed.
I checked the issue I have not found the same issue in the issue list, Can you please tag if any issue is already listed and solved?
e: file:///Users/chetan/.pub-cache/hosted/pub.dev/flutter_unity_widget-2022.2.1/android/src/main/kotlin/com/xraph/plugin/flutter_unity_widget/FlutterUnityWidgetPlugin.kt:97:9 Cannot weaken access privilege 'public' for 'lifecycle' in 'LifecycleOwner' e: file:///Users/chetan/.pub-cache/hosted/pub.dev/flutter_unity_widget-2022.2.1/android/src/main/kotlin/com/xraph/plugin/flutter_unity_widget/FlutterUnityWidgetPlugin.kt:97:21 'lifecycle' hides member of supertype 'LifecycleOwner' and needs 'override' modifier
FAILURE: Build failed with an exception.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction Compilation error. See log for more details
The lifecycle error looks like https://github.com/juicycleff/flutter-unity-view-widget/issues/973
HI @timbotimbo.
I have configured everything, and I did every step you told me, but I am still getting the same error, and the black screen once the build is successful, Please help me to fix this. Also, I have tried adding a useAndroidViewSurface
true or false but still not working tried flutter clean.
Android > 10 flutter 3.24.0 unity 2022.3.43f1. package
flutter_unity_widget:
git:
url: https://github.com/juicycleff/flutter-unity-view-widget.git
ref: flutter_3.24_android_hotfix
ERROR:
java.lang.NullPointerException
https://github.com/juicycleff/flutter-unity-view-widget/issues/984#issue-2515875345
i'm dealing with multiple errors, but I believe that the following fixed an issue that threw this error, .FlutterUnityWidgetController.reattachToView
I'm adding this comment to help others deal with unity/flutter version upgrades where you often end up here again and again.
Adding <string name="game_view_content_description">Game view</string>
to the andoird/app/src/main/res/values/styles.xml
fixed the issue for me. (solution related to UAAL here )
I personaly believe that the .FlutterUnityWidgetController.reattachToView
error is reflecting the fact that something else went horribly wrong at a low level, and this is where the error surfaces to the user. I.e. its not really anthing to do with reattachToView. For example, requesting an android res that doesn't exist isn't being handled very well.
@emileswain Thank you for the response, but this doesn't solve any of my problems. Please check if I am adding it in right way.
The bug The export and flutter build is successful after that, we are getting a yellow screen error on the screen both the real device and the emulator device.
ScreenShot
Error log
Please help us with the issue. I don't know if the above log works to debug the issue, but this is what I am getting in the debug logger. Let me know if any other details are needed.
To see the versions used please refer #981
Thank you.