1

I'm trying to run the code template as my first attempt to work with flutter. I've setted a device with the android studio emulator with charasteristics as follows:

Nexus 5x - api 25 - Nougat 7.1 arm64

I'm working on an amd processor in windows 8.1 aswell. The main issue is when I try to run the emulator inside vs code. It launches the device but after a while it throws the next error:

+Failed to launch emulator: Error: Emulator didn't connected within 60 seconds Origen: Dart

Even when I try to run the app from android studio it doesn't connect, and doesn't even gives some error message.

I would appreciate any help or recommendation to finally start working with flutter.

Flutter doctor:

[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows 
[Versión 6.3.9600], locale es-CL)
[!] Android toolchain - develop for Android devices      
(Android SDK 28.0.3)
X Android license status unknown.
[√] Android Studio (version 3.2)
[√] VS Code, 64-bit edition (version 1.29.1)
[!] Connected device
! No devices available

! Doctor found issues in 2 categories.
yieniggu
  • 384
  • 1
  • 7
  • 20

3 Answers3

2

Emulator didn't connected within 60 seconds

This error is reported by the Dart plugin for VS Code if it launches an emulator but the emulator does not show up in flutter devices within 60 seconds.

First I'd try killing the ADB server:

adb kill-server
adb start-server

If that doesn't help, try launching the emulator outside of VS Code (eg. using flutter emulators --launch) and then seeing whether it turns up in flutter devices from the terminal. If not, then see if it shows up in adb devices.

If it does show up in flutter devices when running it manually, please file a bug against the Dart plugin here but otherwise, please file a bug against Flutter and cc me (@DanTup) and I'll see what I can find.

Danny Tuppeny
  • 40,147
  • 24
  • 151
  • 275
  • thank.. but in which console we have to run this adb kill command, I tried in VS code terminal & it says adb is not recognised. Please help – panky sharma Mar 23 '19 at 17:40
  • You should be able to run it in any terminal. If the built-in terminal says it's not recognised, there may be an issue with the Android SDK not being in your PATH correctly. – Danny Tuppeny Mar 24 '19 at 13:17
0

Run $flutter doctor --android-licenses

Then accept all the licenses you haven't before. It should fix your issue.

Siavash
  • 3,242
  • 3
  • 16
  • 18
0

On the command line, you can run flutter doctor --android-licenses.

After that, it will prompt you to select (y/n) to the licenses.

Press 'Y' until the licenses are all accepted. I had a similar issue and this worked for me.

Automata
  • 1
  • 2