The app ran well the first time with no problem. But then when I stopped the program and ran it again, the emulator failed to launch the app and whited out like the following picture, without throwing any errors.
Console:
Launching lib\main.dart on sdk gphone16k x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk
Debug service listening on ws://127.0.0.1:53998/JPrAPAtzNX8=/ws
Syncing files to device sdk gphone16k x86 64...
I/le.test_project( 7228): Compiler allocated 5174KB to compile void android.view.ViewRootImpl.performTraversals()
Result of flutter doctor -v as follows:
PS D:Developmentfluttertest_project> flutter doctor -v
[√] Flutter (Channel stable, 3.22.3, on Microsoft Windows [Version 10.0.22631.3958], locale en-US)
• Flutter version 3.22.3 on channel stable at C:UsersBlueZflutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision b0850beeb2 (10 days ago), 2024-07-16 21:43:41 -0700
• Engine revision 235db911ba
• Dart version 3.4.4
• DevTools version 2.34.3
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at C:UsersBlueZAppDataLocalAndroidSdk
• Platform android-35, build-tools 35.0.0
• Java binary at: C:Program FilesAndroidAndroid Studiojbrbinjava
• Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:Program FilesGoogleChromeApplicationchrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.3)
• Visual Studio at C:Program FilesMicrosoft Visual Studio2022Community
• Visual Studio Community 2022 version 17.10.35013.160
• Windows 10 SDK version 10.0.22621.0
[√] Android Studio (version 2024.1)
• Android Studio at C:Program FilesAndroidAndroid 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.11+0--11852314)
[√] VS Code (version 1.91.1)
• VS Code at C:UsersBlueZAppDataLocalProgramsMicrosoft VS Code
• Flutter extension version 3.92.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.3958]
• Chrome (web) • chrome • web-javascript • Google Chrome 127.0.6533.72
• Edge (web) • edge • web-javascript • Microsoft Edge 127.0.2651.74
[√] Network resources
• All expected network resources are available.
• No issues found!
If I ‘Wipe Data’ the emulator, it runs fine again, but if not, it fails.
I made new Flutter projects (default counter) and the problem happened to them too. But it didn’t happen to Java default projects. So I guess it’s caused by flutter projects’ settings or sth.
‘Invalidate Caches…’ didn’t change a thing.
I tried migrating gradle files to a new syntax according to this link:
https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply
I also went to ‘Project Structure’ => ‘SDK’ and set it to ‘Android API 35, extension level 13 Platform’ which is the emulator I’m using currently. Not a change.
I reinstalled Flutter SDK / Java JDK / Android Studio, with any personal settings. Didn’t work.
It’s annoying and inefficient having to ‘Wipe Data’ the emulator every time I run an app.
No idea how to solve it. Any advice would help. Thanks in advance.