Debug School

rakesh kumar
rakesh kumar

Posted on • Edited on

Flutter Error:Cannot launch without an active device”

Start emulator → then run:

flutter run
Enter fullscreen mode Exit fullscreen mode

list of checking area

Check if a firewall popup is hiding

Very common on Windows:
When you first run adb, Windows Defender Firewall shows a popup behind other windows and ADB waits forever.

Minimize everything, check taskbar for a “Windows Security / Firewall” dialog.

If you see it → click Allow access.

As soon as you allow, the adb start-server command should finish.

If no popup → go ahead with next steps.

NEXT STEP: Check if ADB PORT (5037) is blocked by another app

ADB hangs at start-server when port 5037 is already used.

➡️ Run this command in CMD (as Administrator):

netstat -aon | find "5037"
Enter fullscreen mode Exit fullscreen mode

You will see one of these:

See what process 4872 actually is

In that Administrator cmd, run:

tasklist /FI "PID eq 4872"
Enter fullscreen mode Exit fullscreen mode

=============================================================
==============FIRST WAY==============
Open Android Studio.

Go to SDK Manager → SDK Tools tab.

Tick Android SDK Platform-Tools.

Click Apply / OK to install fresh.
===========SECOND WAY=============

Delete C:\Users\rakes\AppData\Local\Android\Sdk\platform-tools

ERROR:
The Android emulator exited with code 1 during startup
Android emulator stderr:
Address these issues and try again.

netstat -aon | find "5037"
Enter fullscreen mode Exit fullscreen mode


taskkill /F /PID 14232

tasklist | find "adb.exe"
netstat -aon | find "5037"
adb start-server
flutter doctor -v

Enter fullscreen mode Exit fullscreen mode
wmic process get description,executablepath | find "adb"
Enter fullscreen mode Exit fullscreen mode

Top comments (0)