I try to run a default app on my Android Studio on an Android emulator with API 35, but each time i run the fluter run -v command, the app is stuck in the line: Waiting for VM Service port to be available
, and if I execute flutter run
it is stuck at Built build/app/outputs/flutter-apk/app-debug.apk
The flutter doctor does not show me any problems. Here output from flutter doctor -v
:
[✓] Flutter (Channel stable, 3.27.1, on openSUSE Leap 15.6 6.4.0-150600.21-default, locale en_US.UTF-8)
• Flutter version 3.27.1 on channel stable at /home/farouk/flutter_android_dev/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 17025dd882 (2 days ago), 2024-12-17 03:23:09 +0900
• Engine revision cb4b5fff73
• Dart version 3.6.0
• DevTools version 2.40.2
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at /home/farouk/Android/Sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: /home/farouk/flutter_android_dev/android-studio/jbr/bin/java
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• CHROME_EXECUTABLE = /usr/bin/firefox
[✗] Linux toolchain - develop for Linux desktop
✗ clang++ is required for Linux development.
It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from https://releases.llvm.org/
✗ CMake is required for Linux development.
It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
✗ ninja is required for Linux development.
It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from https://github.com/ninja-build/ninja/releases
• pkg-config version 0.29.2
✗ GTK 3.0 development libraries are required for Linux development.
They are likely available from your distribution (e.g.: apt install libgtk-3-dev)
[✓] Android Studio (version 2024.2)
• Android Studio at /home/farouk/flutter_android_dev/android-studio
• Flutter plugin version 83.0.3
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
[✓] Connected device (3 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 15 (API 35) (emulator)
• Linux (desktop) • linux • linux-x64 • openSUSE Leap 15.6 6.4.0-150600.21-default
• Chrome (web) • chrome • web-javascript • Mozilla Firefox 115.10.0esr
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
And here is the flutter run -v
output:
[ +14 ms] executing: /home/farouk/Android/Sdk/platform-tools/adb -s emulator-5554 shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x20000000 --ez enable-dart-profiling true --ez
enable-checked-mode true --ez verify-entry-points true com.example.untitled/com.example.untitled.MainActivity
[ +84 ms] Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x20000000 cmp=com.example.untitled/.MainActivity (has extras) }
[ ] Waiting for VM Service port to be available...
The app is always in white screen with Flutter logo.
I found many having the same issue but non of their solutions worked for me,the name of the package in the build.gradle is same as the name in manifest.xml and mainActivity
2
Answers
Try
flutter run --release
orflutter run --profile
. If that fails too, the chances are that your adb is damaged. Try to reinstall the adb.Oh did you tried
flutter clean
too?If all of it fails
flutter run --no-devtools
. It disables the VM service if i am sure…I see that you’re also using Flutter 3.27. For me, this issue was fixed by downgrading back to Flutter 3.24.
Here’s the bug report for this issue on GitHub. They seem to have not fixed it yet…