-
Notifications
You must be signed in to change notification settings - Fork 525
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
[Android] Compiling error flutter 3.24 #973
Comments
Looks like an AndroidX library got updated in Flutter, resulting in an change in the LifecycleOwner kotlin interface. As a result the current implementation breaks on Flutter 3.24.0+, but updating this implementation will break the plugin on all earlier Flutter versions. Looking at the source, this is only used in a private class, which does not seem to have any references anywhere else in the plugin. Lines 96 to 163 in 45fffb5
Simply deleting or commenting this class does not seem to break anything and allows me to run the example project with Flutter 3.24. [UPDATE] [UPDATE 2] The fix below is now also on the master branch. As a test I made a branch that should get this working again. You can try it using this in
I can't publish plugin updates, so we would need @juicycleff to make a new release for Flutter 3.24. |
@timbotimbo Thank you very much! You helped me a lot! God bless you! |
@timbotimbo Any chance you could apply that same fix over on the 6.0 branch? I'm testing it out and just hit this error, and one other one I'm about to write up. |
I added the fix to the @artificerchris |
Thank you very much! |
thanks you it is working now |
this fixed most of my problems, I later had some conflicts with NDK but I managed to fix it. Thank you |
Describe the bug
After the update to flutter 3.24 every time I try to build & run on the emulator I get these error messages:
e: file:///Users/{user}/.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/{user}/.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
I already tried to run flutter clean and rebuild the unity project from unity but always the same error
Unity:
Smartphone:
The text was updated successfully, but these errors were encountered: