Can't connect to an avd

4,826

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.

Share:
4,826
yieniggu
Author by

yieniggu

Updated on December 08, 2022

Comments

  • yieniggu
    yieniggu over 1 year

    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.
    
    • flutter
      flutter over 5 years
      what doesadb devices return
    • Vanethos
      Vanethos over 5 years
      On the terminal, in the root folder of the project, what is the outcome of flutter run?
    • yieniggu
      yieniggu over 5 years
      after changing the boot mode to cold boot, restarting the adb server and running the app from vs code, it now connects to the device, but throws adb not responding and exits.
    • Rahul Shukla
      Rahul Shukla almost 5 years
    • Webkraft Studios
      Webkraft Studios over 4 years
      I found this was caused after I had changed some settings within the android folder. Can check by creating a new project and copying over the android folder
  • panky sharma
    panky sharma about 5 years
    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
  • Danny Tuppeny
    Danny Tuppeny about 5 years
    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.