1

I am new to Flutter and am trying to launch Android Studio Emulator.

The emulator launches but the app does not, and the following error displays every single time:

failed to launch pixel 3a api 30: error: emulator didn't connect within 60 seconds

I have tried fixing it by following similar posts here: Failed to launch emulator: Error: Emulator didn't connect within 60 seconds

However, this problem has not been resolved and error continues to show. Any help would be appreciated.

No_Name
  • 155
  • 2
  • 14
  • first you can check with following commands: flutter devices or flutter emulator. to check weather emulator is online or not – Hardik Mehta Jan 04 '22 at 05:59
  • Did you run the app?(f5 button) – amin jamali Jan 04 '22 at 05:59
  • @HardikMehta When I run the commands on VScode powershell, it doesn't appear online. But when I click on devices to launch it, I can use the AVD I had created on Android Studio. Since I'm new, I'm not really clear on what step I missed while I tried to launch the app. – No_Name Jan 05 '22 at 07:04
  • If you have android studio installed then create device using AVD manager and make it run first then try to run using VS CODE. – Hardik Mehta Jan 05 '22 at 07:09
  • I launched it through Android Studio this time, and the same problem persists. Emulator launches, but app does not. – No_Name Jan 05 '22 at 07:44

4 Answers4

0

I had the same problem and tried all the solutions with the Android emulator and all the solutions did not work. But I found the solution through this code, it can work for you.

in terminal

flutter run
Bin Khanjar
  • 87
  • 1
  • 4
0

Since you've got your Android Emulator running, try to follow this steps:

  1. Run the command flutter emulators in your terminal.

It will show all the available emulators and simulators

2 available emulators:

apple_ios_simulator • iOS Simulator   • Apple  • ios
Pixel_XL_API_33     • Pixel XL API 33 • Google • android
  1. Select the relevant emulator (in my case Pixel_XL_API_33)and run the command flutter emulators --launch Pixel_XL_API_33.

  2. Within your app folder path, run flutter run.

After successfully run, you will get something like this:

Using hardware rendering with device AOSP on IA Emulator. If you notice graphics artifacts, consider enabling software rendering with "--enable-software rendering".
Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done
MαπμQμαπkγVπ.0
  • 5,887
  • 1
  • 27
  • 65
0

I encountered this error while attempting to launch the emulator. I also had tried every solution posted here but nothing worked for me. After investigating the problem, I identified that the root cause was a white space in the path to my Android SDK within my user name directory.

To resolve this issue, I performed a reinstallation of the Windows operating system and removed the white space from my user name. Following this change, the issue was successfully resolved, and the emulator launched without any further errors.

0

I faced the same error, and when I checked, I found I didn't have enough space in the C partition.