Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.

Boa tarde **Fiz tudo igual e ainda da esse erro**

2 respostas

It seems like you're having trouble launching an emulator because no emulators were found with the command emulator -list-avds. This typically means that there are no Android Virtual Devices (AVDs) set up on your machine. Here's how you can resolve this issue:

  1. Check if AVDs are indeed missing: Open your Android Studio and go to the AVD Manager (you can find it in the top-right corner or under "Tools" > "AVD Manager"). Check if there are any devices listed there. If not, you'll need to create one.

  2. Create an AVD:

    • In the AVD Manager, click on "Create Virtual Device".
  3.   - Choose a device definition (e.g., Pixel 4) and click "Next".
  4.      - Select a system image for the emulator (e.g., a specific version of Android). You might need to download the system image if it's not already available.
  5.         - Verify the configuration and finish by clicking "Finish".
  6. Verify the setup: Once you have set up an AVD, run emulator -list-avds again in your terminal or command prompt. You should now see the newly created AVD listed.

  7. Run the emulator: You can start the emulator by clicking the "play" button in the AVD Manager or by running emulator -avd [AVD_NAME] from your command line, replacing [AVD_NAME] with the name of your AVD.

  8. Troubleshooting:

    • Make sure you have the latest version of the Android SDK and the necessary tools installed.
  9.   - Ensure that the environment variable `ANDROID_SDK_ROOT` is set correctly.
  10.      - If you're running this in a CI/CD pipeline or a headless environment, make sure you have the correct setups for running emulators in such environments.

If you continue to face issues, you might want to check if there are any specific logs or error messages that can give more insight into what might be going wrong. Additionally, ensure your development setup meets all the prerequisites for running Android emulators.

Insira aqui a descrição dessa imagem para ajudar na acessibilidade po estou perdido, de verdade!

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software