7

I'm using Android Studio to create Flutter application. It works perfectly on iOS simulators, however, I cannot run it on Android emulators.

iOS As you can see in the screenshot, I can see my iPhone 8 simulator but I cannot see Android emulator, although I'm running "Pixel 2" emulator.

You can see my virtual devices in the screenshot below.

Android

Update 1:

This is the output of flutter doctor:

[✓] Flutter (Channel beta, v0.3.2, on Mac OS X 10.13.4 17E202, locale en-KW)
[✓] Android toolchain - develop for Android devices (Android SDK 26.0.2)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
[✓] Android Studio (version 3.1)
[✓] VS Code (version 1.23.1)
[✓] Connected devices (1 available)

• No issues found!
7
  • Try killall -9 dart and adb kill-server Commented May 14, 2018 at 18:10
  • I tried. Didn't work. Commented May 14, 2018 at 19:39
  • Can you please add the output of flutter doctor? Commented May 15, 2018 at 2:35
  • Do you see any log-msgs in the 'logcat' window that seem suspicious, when you try to debug using an Android emulator? Commented May 15, 2018 at 2:56
  • @GünterZöchbauer I have updated the post and added the output of flutter doctor. Commented May 15, 2018 at 7:33

1 Answer 1

21

Short answer

Probably the Project SDK is not set. Set it from Android Studio;

  • File -> Project Structure -> Project Settings -> Project

Longer answer

I had the same issue;

  • flutter doctor command says everything is OK
  • AVDs are created with Android Studio's AVD Manager
  • Android Studio shows no devices to run app on

I realized that Flutter's doctor can be also run from Android Studio (Tools -> Flutter -> Flutter Doctor) and it had a problem with Android toolchain; said that SDK is not set. I am not sure how this doctor has different output from flutter doctor run from the project's directory, but it was the correct one. I just went to File -> Project Structure and under Project Settings -> Project selected the appropriate Project SDK - Android API xx Platform (was <No-SDK>).

Sign up to request clarification or add additional context in comments.

1 Comment

This woked for me. It seem Android Studio doesn't know for what sdk emulator looking for... thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.