Приложение Flutter аварийно завершает работу при смене обоев или темы ⇐ Android
Приложение Flutter аварийно завершает работу при смене обоев или темы
my flutter app crashing and restarting when wallpaper or theme is change in Android 12 and above version , so my question is how can stop crashing or how can handle this issue when user changed theme or wallpaper (app runs in foreground and background and it doesn't matter because the app crashes in both)
I test this problem in some popular apps like Telegram, Chrome, YouTube and the result is that they handle this problem successfully because their app doesn't restart and don't lose their current app state.
here is Debug Console when app restart :
D/EGL_emulation( 8526): eglCreateContext: 0x7294ea117550: maj 2 min 0 rcv 2 D/EGL_emulation( 8526): eglCreateContext: 0x7294ea11af10: maj 2 min 0 rcv 2 D/HostConnection( 8526): createUnique: call D/HostConnection( 8526): HostConnection::get() New Host Connection established 0x7294ea119590, tid 8652 D/HostConnection( 8526): 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_read_color_buffer_dma ANDROID_EMU_hwc_multi_configs GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2 D/EGL_emulation( 8526): eglMakeCurrent: 0x7294ea11af10: ver 2 0 (tinfo 0x7297091e7200) (first time) here is AndroidManifest.xml :
here is Flutter doctor -v :
• Upstream repository https://github.com/flutter/flutter.git • Framework revision 7048ed95a5 (6 weeks ago), 2023-02-01 09:07:31 -0800 • Engine revision 800594f1f4 • Dart version 2.19.1 • DevTools version 2.20.1 [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.1) • Android SDK at C:\Users\amir6\AppData\Local\Android\sdk • Platform android-33, build-tools 33.0.1 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [!] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.24) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools • Visual Studio Build Tools 2019 version 16.11.33328.57 X The current Visual Studio installation is incomplete. Please reinstall Visual Studio. [√] Android Studio (version 2021.3) • 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 11.0.13+0-b1751.21-8125866) [√] VS Code (version 1.76.2) • VS Code at C:\Users\amir6\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.61.20230301 [√] Connected device (4 available) • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 13 (API 33) (emulator) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22621.1413] • Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.65 • Edge (web) • edge • web-javascript • Microsoft Edge 111.0.1661.41 [√] HTTP Host Availability • All required HTTP hosts are available I'm trying to develop an app that doesn't crash or restart when user change the theme or wallpaper.
Источник: https://stackoverflow.com/questions/757 ... -is-change
my flutter app crashing and restarting when wallpaper or theme is change in Android 12 and above version , so my question is how can stop crashing or how can handle this issue when user changed theme or wallpaper (app runs in foreground and background and it doesn't matter because the app crashes in both)
I test this problem in some popular apps like Telegram, Chrome, YouTube and the result is that they handle this problem successfully because their app doesn't restart and don't lose their current app state.
here is Debug Console when app restart :
D/EGL_emulation( 8526): eglCreateContext: 0x7294ea117550: maj 2 min 0 rcv 2 D/EGL_emulation( 8526): eglCreateContext: 0x7294ea11af10: maj 2 min 0 rcv 2 D/HostConnection( 8526): createUnique: call D/HostConnection( 8526): HostConnection::get() New Host Connection established 0x7294ea119590, tid 8652 D/HostConnection( 8526): 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_read_color_buffer_dma ANDROID_EMU_hwc_multi_configs GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2 D/EGL_emulation( 8526): eglMakeCurrent: 0x7294ea11af10: ver 2 0 (tinfo 0x7297091e7200) (first time) here is AndroidManifest.xml :
here is Flutter doctor -v :
• Upstream repository https://github.com/flutter/flutter.git • Framework revision 7048ed95a5 (6 weeks ago), 2023-02-01 09:07:31 -0800 • Engine revision 800594f1f4 • Dart version 2.19.1 • DevTools version 2.20.1 [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.1) • Android SDK at C:\Users\amir6\AppData\Local\Android\sdk • Platform android-33, build-tools 33.0.1 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [!] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.24) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools • Visual Studio Build Tools 2019 version 16.11.33328.57 X The current Visual Studio installation is incomplete. Please reinstall Visual Studio. [√] Android Studio (version 2021.3) • 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 11.0.13+0-b1751.21-8125866) [√] VS Code (version 1.76.2) • VS Code at C:\Users\amir6\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.61.20230301 [√] Connected device (4 available) • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 13 (API 33) (emulator) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22621.1413] • Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.65 • Edge (web) • edge • web-javascript • Microsoft Edge 111.0.1661.41 [√] HTTP Host Availability • All required HTTP hosts are available I'm trying to develop an app that doesn't crash or restart when user change the theme or wallpaper.
Источник: https://stackoverflow.com/questions/757 ... -is-change
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Приложение Flutter iOS аварийно завершает работу на устройстве при отключении от сети
Anonymous » » в форуме IOS - 0 Ответы
- 76 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Приложение Flutter аварийно завершает работу при запуске и зависает в GradelBuild
Anonymous » » в форуме Android - 0 Ответы
- 44 Просмотры
-
Последнее сообщение Anonymous
-