13

I'm a beginner in Flutter and I've an emulator opened/powered on and android studio doesn't detect it.

enter image description here

Hence I can't run any program because "no device is running". I've tried installing 'Android emulator' in the SDK tools but android studio still cant detect it.

ruleboy21
  • 5,510
  • 4
  • 17
  • 34
JamesDev
  • 139
  • 1
  • 1
  • 7

9 Answers9

5

I had same problem.

CMD: flutter devices
No devices detected.

CMD: device emulators
Device emulator-5554 is offline.

In Android virtual device manager, I cold boot emulator and it started working.

bilal
  • 2,187
  • 3
  • 22
  • 23
5

Android Studio device list shows "loading" and no devices connected. Thus, I opened emulator but I cannot run flutter on emulator on Android Studio. After 5 hours I found that the reason is the new Flutter version.

I solved with choose different version of Dart and Flutter!

You need to download 1.17.3 version. Quick download link: Dowloand Flutter SDK 1.17.3 Version

And switch Stable Channel & Dart: 2.8.4, this is important. Also, if you want, you can check all versions of Flutter SDK: Flutter Versions

On MacOS, just write terminal: flutter channel stable

Note: If this answer is not working for you, you can open android module of your flutter app in Android Studio. It can be helpful when you try to add Firebase skills.

canerkaseler
  • 6,204
  • 45
  • 38
1

In a windows platform I did:

If you have ran flutter doctor and there is no issues and if you can run your flutter app in cmd or using VSCode:

Just try to open Android Studio or IntelliJ as administrator by right clicking on the icon. This may list down devices and solve your problem.

The reason may be you have cloned flutter repository or you don't have right permission in flutter installed directory.

Blasanka
  • 21,001
  • 12
  • 102
  • 104
0

Run flutter doctor command to check whats the problem.

In terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device. Check your flutter plugin whether it is up to date.

And read this flutter run: No connected devices , You may find the solution.

Robin
  • 4,902
  • 2
  • 27
  • 43
0

For me (on a Mac) I had the Android SDK installed in a custom location so I needed to set the ANDROID_HOME environment variable. In the terminal you can check what this value is with:

echo $ANDROID_HOME

I added the Android SDK to my .bash_profile (might be a different file if you are using Linux or Windows) for both ANDROID_HOME and PATH.

# already had these
export PATH="$PATH":"/opt/android-sdk/tools"
export PATH="$PATH":"/opt/flutter-sdk/bin"

# added this
export ANDROID_HOME="/opt/android-sdk"

Replace /opt/android-sdk with wherever yours is.

Then I updated the variables with

source .bash_profile

Testing with flutter doctor showed it was working.

flutter doctor

I restarted Android Studio and the emulator worked.

Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
0

The last version of Flutter 1.17.5 (release the 2th, July) solved this issue for me.
Just flutter upgrade

Eric Taix
  • 911
  • 1
  • 12
  • 24
0

run Flutter doctor to make sure you install everything.

run Flutter devices to see whether it is detected by flutter or not.

if you can find the your emulator there run flutter run -d <YOUR_EMULATOR_ID>

if you unable to find your emulator there may be you have to accept the android licenses . run flutter doctor --android-licenses to accept.

run flutter emulators to see list of emulators you have.

run flutter emulators --launch <emulator id> to launch

run Flutter devices to check whether emulator is detected by flutter or not.

run flutter run -d <YOUR_DEVICE_ID>

ujjal das
  • 897
  • 11
  • 15
0

What worked for me is, updating Android Emulator.

  • Visit SDK Manager
  • Check whether any updates available for Android Emulator
  • If available, install the newest version

Hope this would be helpful!!!

SandaliTP
  • 795
  • 5
  • 7
0

I had this issue on Android Studio.

I had an emulator but it was not recognized even though the emulator was open.

I got around this by launching developer mode inside of the actual emulator by following the steps in this link: https://tweaklibrary.com/how-to-enable-developer-mode-on-android/#:~:text=How%20to%20Enable%20Developer%20Options%20On%20Android.%201,one%20of%20the%20most%20powerful%20...%20More%20items

After setting the emulator to developer mode, the emulator phone appeared as an option and when I ran the flutter hello world it appeared on the emulator.