-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Description
Since updating to Flutter 3.22 I'm running into an Android exception when embedding Unity into Flutter using either the flutter_unity_widget or flutter_embed_unity plugin.
This only happens on Android < 13.
Even though the exception happens in the native Unity code, I believe this is at least partially a Flutter issue as I can pinpoint the exact Flutter commit that introduces it.
This triggers when Augmented Reality is enabled in Unity, and has nothing to do with performing the Predicitve back gesture itself.
It looks like a function with return type OnBackInvokedCallback is called from the Flutter internals.
E/Unity (26660): AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/window/OnBackInvokedCallback;
E/Unity (26660): java.lang.NoClassDefFoundError: Failed resolution of: Landroid/window/OnBackInvokedCallback;
E/Unity (26660): at java.lang.reflect.Executable.getMethodReturnTypeInternal(Native Method)
E/Unity (26660): at java.lang.reflect.Method.getReturnType(Method.java:148)
E/Unity (26660): at java.lang.Class.getDeclaredMethods(Class.java:1880)
E/Unity (26660): at com.unity3d.player.ReflectionHelper.getMethodID(Unknown Source:0)
E/Unity (26660): at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
E/Unity (26660): at com.unity3d.player.UnityPlayer.-$$Nest$mnativeRender(Unknown Source:0)
E/Unity (26660): at com.unity3d.player.UnityPlayer$F$a.handleMessage(Unknown Source:0)
E/Unity (26660): at android.os.Handler.dispatchMessage(Handler.java:102)
E/Unity (26660): at android.os.Looper.loop(Looper.java:214)
E/Unity (26660): at com.unity3d.player.UnityPlayer$F.run(Unknown Source:0)
E/Unity (26660): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.window.OnBackInvokedCallback" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar"
Looking up OnBackInvokedCallback, it has only been added since API 33 for the predicitive back functionality, and doesn't seem to be backwards compatible.
Supporting the predictive back gesture requires updating your app, using the backward compatible OnBackPressedCallback AppCompat 1.6.0-alpha05 (AndroidX) or higher API, or using the new OnBackInvokedCallback platform API. Most apps will use the backward compatible AndroidX API.
I already tried enabling and disabling predicitve back by adding android:enableOnBackInvokedCallback="false" (and "true") to all the androidManifest files in the project.
Flutter commit with regression
The crash is introduced on master with Flutter commit commit 66d1872, when The engine PR Platform channel for predictive back in route transitions on android got merged into master.
If I checkout Flutter master at the commit before this, the exception doesn't occur.
Reproduction
This
- Does NOT occur on a standalone Unity build without Flutter
- Does NOT occur on Android 13 or newer
- Does NOT occur on Flutter versions before 3.22
- Does NOT occure on Flutter master before the 66d1872 commit menitoned above.
I can only trigger this when enabling Augmented Reality functionality in Unity. If the build does not include AR, or the android device does not support AR, the exception doesn't happen.
I assume Google Arcore starts a new Activity or Thread or something that triggers a response from the new Flutter platform channel.
Reproduction devices
Devices that I tested this on:
| Device | Android | Works |
|---|---|---|
| Samsung galaxy S8 | 9 | ❌ |
| Nokia 8.1 | 11 | ❌ |
| Lenovo tab M10 FHD plus | 10 | ❌ |
| Samsung Galaxy S10 | 12 | ❌ |
| Xiaomi redmi note 10 pro | 13 | ✔️ |
| Samsung galaxy S20FE | 13 | ✔️ |
| emulator Pixel 8 pro Arm 64 API 32 | 12 | ❌ |
| emulator Pixel 8 Pro Arm 64 API 34 | 14 | ✔️ |
All devices functioned normally on older Flutter versions like 3.16.9.
This only reproduces on 3.22.x and master.
Reproduction steps
- Download or clone the code sample.
- Run the project on a real Android device. (for emulator see section below)
- You'll see Unity starting up with a splash screen and after that a rotating Flutter logo.
If the crash reproduces it should freeze in a couple of seconds. - On unaffected devices the logo keeps spinning, and you can now enable ar with the toggle at the bottom.
Using a combination of Flutter >= 3.22 and Android <13 you will see the platformview freeze at step 2.
Any older Flutter version should just work.
If you test this on Flutter 3.16 or 3.19, you need to use Android >= 10, otherwise a Flutter bug causes the platformview to be invisible.
Reproduction on Emulators
I had issues getting AR support to be detected on emulators, which is needed to reproduce this exception.
- On Windows 10 with x86/x64 emulators I could not get AR support to be detected, and could not reproduce the exception.
- On Mac (apple silicon) I could get it to work on Arm64 emulators after installing the Google_Play_Services_for_AR_1.44.0.apk APK file on the emulator first. (NOT the x86_for_emulator variant)
The attached screen recording shows 2 emulators on mac.
In some cases you might get a purple screen instead of seeing Unity, this is a compaitiblity issue with Unity as it doesn't officially support running on emulators.
Expected result
No exception that Freezes the platformview, just like on Android 13+ or Flutter < 3.22.
Actual result
Unity inside the platform view receives a message that triggers an exception, which crashes Unity.
Code sample
This reproduction project uses the flutter_embed_unity plugin and comes with a prebuilt unity project so that you only need Flutter to run it.
This was built using Unity LTS 2022.3.37 released on 09-07-2024, the latest LTS version.
https://github.com/timbotimbo/flutter_embed_unity_repro/tree/ar_crash
Screenshots or Video
The exception crashes Unity, so in the screen recording you will just see Unity freeze.
APi 32 vs API 34 emulator on mac
onbackinvokedcallback.mp4
Logs
Running from Visual Studio code on Mac, on an API 32 Arm64 emulator.
Debug console
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply
You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply
✓ Built build/app/outputs/flutter-apk/app-debug.apk
D/FlutterEmbedLog(15782): onAttachedToEngine
D/FlutterEmbedLog(15782): onAttachedToActivity
D/FlutterEmbedLog(15782): Activity resumed, resuming Unity
Connecting to VM Service at ws://127.0.0.1:58582/mka4ULEzDh8=/ws
D/com.learntoflutter.flutter_embed_unity_android.platformView.UnityViewFactory@7c30631(15782): UnityViewFactory creating view 0
I/IL2CPP (15782): JNI_OnLoad
I/FlutterEmbedLog(15782): Attached Unity to view
I/FlutterEmbedLog(15782): Attached Unity to new view
D/FlutterEmbedLog(15782): UnityPlatformView onFlutterViewAttached
I/PlatformViewsController(15782): Hosting view in a virtual display for platform view: 0
I/PlatformViewsController(15782): PlatformView is using SurfaceProducer backend
I/flutter (15782): FlutterEmbed: onPlatformViewCreated(0)
D/FlutterEmbedLog(15782): UnityPlayerSingleton onWindowVisibilityChanged 0
D/FlutterEmbedLog(15782): UnityPlayerSingleton became visible, so pausing and resuming Unity
I/Unity (15782): MemoryManager: Using 'Dynamic Heap' Allocator.
W/d_unity_exampl(15782): Accessing hidden method Ljava/lang/invoke/MethodHandles$Lookup;-><init>(Ljava/lang/Class;I)V (unsupported, reflection, allowed)
W/ImageReaderSurfaceProducer(15782): ImageTextureEntry can't wait on the fence on Android < 33
I/Unity (15782): SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 4, Memory = 1966mb
I/Unity (15782): SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf), 0 little (mask: 0x0)
I/Unity (15782): ApplicationInfo com.learntoflutter.flutter_embed_unity_example version 1.0
I/Unity (15782): Built from '2022.3/staging' branch, Version '2022.3.37f1 (340ba89e4c23)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
E/libprocessgroup(15782): set_timerslack_ns write failed: Operation not permitted
I/Unity (15782): Company Name: DefaultCompany
I/Unity (15782): Product Name: FlutterEmbedUnityExample
D/HostConnection(15782): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
E/EGL_emulation(15782): eglCreateContext: EGL_BAD_CONFIG: no ES 3.2 support
E/EGL_emulation(15782): tid 15882: eglCreateContext(1849): error 0x3005 (EGL_BAD_CONFIG)
E/EGL_emulation(15782): eglCreateContext: EGL_BAD_CONFIG: no ES 3.1 support
E/EGL_emulation(15782): tid 15882: eglCreateContext(1843): error 0x3005 (EGL_BAD_CONFIG)
E/EGL_emulation(15782): [getAttribValue] Bad attribute idx
D/EGL_emulation(15782): eglGetConfigAttrib: bad attrib 0x1
E/EGL_emulation(15782): tid 15882: eglGetConfigAttrib(1292): error 0x3004 (EGL_BAD_ATTRIBUTE)
D/EGL_emulation(15782): eglCreateContext: 0xb400007bc80dd910: maj 3 min 0 rcv 3
D/EGL_emulation(15782): eglCreateContext: 0xb400007bc80dd910: maj 3 min 0 rcv 3
D/EGL_emulation(15782): eglCreateContext: 0xb400007bc80dd910: maj 3 min 0 rcv 3
D/EGL_emulation(15782): eglMakeCurrent: 0xb400007bc80dd910: ver 3 0 (tinfo 0x7ddea78280) (first time)
D/Unity (15782): GL_EXT_debug_marker GL_EXT_robustness GL_OES_EGL_sync GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_depth24 GL_OES_depth32 GL_OES_element_index_uint GL_OES_texture_float GL_OES_texture_float_linear GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_texture_npot GL_OES_rgb8_rgba8 GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_texture_format_BGRA8888 GL_APPLE_texture_format_BGRA8888 ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulka
D/Unity (15782): n_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
D/HostConnection(15782): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
D/EGL_emulation(15782): eglMakeCurrent: 0xb400007bc80dd910: ver 3 0 (tinfo 0x7ddea78300) (first time)
W/AudioTrack(15782): Use of stream types is deprecated for operations other than volume control
W/AudioTrack(15782): See the documentation of AudioTrack() for what to use instead with android.media.AudioAttributes to qualify your playback use case
W/Unity (15782): The referenced script (Unknown) on this Behaviour is missing!
W/Unity (15782): The referenced script on this Behaviour (Game Object '<null>') is missing!
I/Unity (15782): XRGeneral Settings awakening...
I/Unity (15782): UnityEngine.XR.Management.XRGeneralSettings:Awake()
I/Unity (15782):
I/IL2CPP (15782): Locale en-US
I/native (15782): I0000 00:00:1720970874.765734 15882 arpresto_api.cc:36] ArPresto::ArPresto_initialize
V/Unity-ARCore(15782): Initializing ARCore Pause Handler
V/Unity-ARCore(15782): PauseHandler: JNI not attached to thread. Attempting to attach.
V/Unity-ARCore(15782): PauseHandler: Attached JNI to thread.
V/MediaRouter(15782): Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
I/MediaRouter(15782): Skip setBluetoothA2dpOn(): types=8388615, isPlaybackActive()=true, BT route=null
D/EGL_emulation(15782): app_time_stats: avg=22.38ms min=3.98ms max=141.94ms count=44
D/EGL_emulation(15782): app_time_stats: avg=3.57ms min=2.77ms max=9.98ms count=62
D/EGL_emulation(15782): app_time_stats: avg=16.61ms min=13.07ms max=19.75ms count=61
I/native (15782): I0000 00:00:1720970876.856223 15882 arpresto_api.cc:111] ArPresto::ArPresto_checkApkAvailability
I/native (15782): I0000 00:00:1720970876.873243 15882 arpresto_api.cc:70] ArPresto::ArPresto_handleActivityResume
I/Unity (15782): ARCheckAvailability: check
I/Unity (15782): Assets.Scripts.<CheckAvailabilityCoroutine>d__2:MoveNext()
I/Unity (15782): UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
I/Unity (15782):
I/Unity (15782): ARCheckAvailability: checking...
I/Unity (15782): Assets.Scripts.<CheckAvailabilityCoroutine>d__2:MoveNext()
I/Unity (15782): UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
I/Unity (15782):
D/EGL_emulation(15782): eglCreateContext: 0xb400007bc80dbed0: maj 3 min 0 rcv 3
I/native (15782): I0000 00:00:1720970876.969729 15882 arpresto_api.cc:193] ArPresto::ArPresto_setCameraTextureNames
I/native (15782): I0000 00:00:1720970876.969763 15882 arpresto_api.cc:212] ArPresto::ArPresto_setEnabled
W/Unity (15782): Additional Lights Cookie Format (GrayscaleHigh) is not supported by the platform. Falling back to 32-bit format (RGBA8 UNorm)
W/Unity (15782): UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset:get_additionalLightsCookieFormat()
W/Unity (15782): UnityEngine.Rendering.Universal.UniversalRenderer:.ctor(UniversalRendererData)
W/Unity (15782): UnityEngine.Rendering.Universal.UniversalRendererData:Create()
W/Unity (15782): UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset:CreateRenderers()
W/Unity (15782): UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset:CreatePipeline()
W/Unity (15782): UnityEngine.Rendering.RenderPipelineAsset:InternalCreatePipeline()
W/Unity (15782): UnityEngine.Rendering.RenderPipelineManager:PrepareRenderPipeline(RenderPipelineAsset)
W/Unity (15782): UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal(RenderPipelineAsset, IntPtr, Object)
W/Unity (15782):
D/EGL_emulation(15782): app_time_stats: avg=7.34ms min=2.66ms max=199.94ms count=59
E/Unity (15782): AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/window/OnBackInvokedCallback;
E/Unity (15782): java.lang.NoClassDefFoundError: Failed resolution of: Landroid/window/OnBackInvokedCallback;
E/Unity (15782): at java.lang.reflect.Executable.getMethodReturnTypeInternal(Native Method)
E/Unity (15782): at java.lang.reflect.Method.getReturnType(Method.java:148)
E/Unity (15782): at java.lang.Class.getDeclaredMethods(Class.java:1914)
E/Unity (15782): at com.unity3d.player.ReflectionHelper.getMethodID(Unknown Source:26)
E/Unity (15782): at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
E/Unity (15782): at com.unity3d.player.UnityPlayer.-$$Nest$mnativeRender(Unknown Source:0)
E/Unity (15782): at com.unity3d.player.UnityPlayer$F$a.handleMessage(Unknown Source:122)
E/Unity (15782): at android.os.Handler.dispatchMessage(Handler.java:102)
E/Unity (15782): at android.os.Looper.loopOnce(Looper.java:201)
E/Unity (15782): at android.os.Looper.loop(Looper.java:288)
E/Unity (15782): at com.unity3d.player.UnityPlayer$F.run(Unknown Source:24)
E/Unity (15782): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.window.OnBackInvokedCallback" on path: DexPathList[[zip file
I/Unity (15782): ARCheckAvailability: available
I/Unity (15782): Assets.Scripts.<CheckAvailabilityCoroutine>d__2:MoveNext()
I/Unity (15782): UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
I/Unity (15782):
Application finished.
Exited.
Flutter Doctor output
Windows ( Flutter master)
[√] Flutter (Channel master, 3.24.0-1.0.pre.69, on Microsoft Windows [Version 10.0.19045.4529], locale en-GB)
• Flutter version 3.24.0-1.0.pre.69 on channel master at C:\Flutter\flutter_windows_default\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 515c52679b (2 hours ago), 2024-07-10 03:40:26 -0400
• Engine revision db2b45bea2
• Dart version 3.6.0 (build 3.6.0-22.0.dev)
• DevTools version 2.37.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:\Users\XXXXXX\AppData\Local\Android\sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.0)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.9.34607.119
• Windows 10 SDK version 10.0.22000.0
[√] Android Studio (version 2024.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105)
[√] VS Code (version 1.91.0)
• VS Code at C:\Users\XXXXXX\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.92.0
[√] Connected device (5 available)
• SM G780G (mobile) • RF8R8021WSR • android-arm64 • Android 13 (API 33)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 14 (API 34) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.4529]
• Chrome (web) • chrome • web-javascript • Google Chrome 126.0.6478.127
• Edge (web) • edge • web-javascript • Microsoft Edge 126.0.2592.87
[√] Network resources
• All expected network resources are available.
• No issues found!
Mac (Flutter 3.22.2)
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64, locale en-GB)
• Flutter version 3.22.2 on channel stable at /Users/XXXXXX/Development/Flutter/3.22.2-stable/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 761747bfc5 (6 weeks ago), 2024-06-05 22:15:13 +0200
• Engine revision edd8546116
• Dart version 3.4.3
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/XXXXXX/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS and macOS development.
Download at: https://developer.apple.com/xcode/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
[✓] VS Code (version 1.87.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.84.0
[✓] Connected device (4 available)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 14 (API 34) (emulator)
• sdk gphone64 arm64 (mobile) • emulator-5556 • android-arm64 • Android 12 (API 32) (emulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.5 23F79 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 126.0.6478.127
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.