skip to Main Content

I am trying to setup Flutter to VS Code. I have been watching some videos to do it and what seems to work on Youtube does not work for me. I have setup everything but when it comes to running the default app that flutter creates I cannot run it on an Android emulator.

This is the Error I get:

UserName@DESKTOP MINGW64 ~/OneDrive/Projects/RandomProject/design_files/frontend/learning_excercises (initial)
$ flutter emulators --launch flutter_emulator
The Android emulator exited with code -1073741819 during startup
Android emulator stderr:
[16736:21260:20240526,210144.551:ERROR filesystem_win.cc:130] GetFileAttributes C:UsersUserNameAppDataLocalTemp\AndroidEmulatoremu-crash-34.2.14.dbattachmentsbcccc26-9e13-4c05-9d1d-23a8c3aad815: The system cannot find the file specified. (2)
[16736:21260:20240526,210144.553:ERROR filesystem_win.cc:130] GetFileAttributes C:UsersUserNameAppDataLocalTemp\AndroidEmulatoremu-crash-34.2.14.dbattachments5711c4b0-2ae5-44dc-9e89-6636783173db: The system cannot find the file specified. (2)
[20932:18244:20240526,210144.593:ERROR filesystem_win.cc:130] GetFileAttributes C:UsersUserNameAppDataLocalTemp\AndroidEmulatoremu-crash-34.2.14.dbattachmentsbcccc26-9e13-4c05-9d1d-23a8c3aad815: The system cannot find the file specified. (2)
[20932:18244:20240526,210144.593:ERROR filesystem_win.cc:130] GetFileAttributes C:UsersUserNameAppDataLocalTemp\AndroidEmulatoremu-crash-34.2.14.dbattachments5711c4b0-2ae5-44dc-9e89-6636783173db: The system cannot find the file specified. (2)
WARNING | Failed to process .ini file C:UsersUserName.androidavd..avdflutter_emulator.avdquickbootChoice.ini for reading.
added library vulkan-1.dll
[20932:21428:20240526,210144.981:ERROR filesystem_win.cc:130] GetFileAttributes C:UsersUserNameAppDataLocalTemp\AndroidEmulatoremu-crash-34.2.14.dbattachmentsbcccc26-9e13-4c05-9d1d-23a8c3aad815: The system cannot find the file specified. (2)
[20932:18244:20240526,210144.989:ERROR filesystem_win.cc:130] GetFileAttributes C:UsersUserNameAppDataLocalTemp\AndroidEmulatoremu-crash-34.2.14.dbattachmentsbcccc26-9e13-4c05-9d1d-23a8c3aad815: The system cannot find the file specified. (2)
[20932:18244:20240526,210144.989:ERROR filesystem_win.cc:130] GetFileAttributes C:UsersUserNameAppDataLocalTemp\AndroidEmulatoremu-crash-34.2.14.dbattachmentsc975c4f-3694-4da6-92b0-2f47681e2932: The system cannot find the file specified. (2)
[20932:18244:20240526,210144.989:ERROR filesystem_win.cc:130] GetFileAttributes C:UsersUserNameAppDataLocalTemp\AndroidEmulatoremu-crash-34.2.14.dbattachmentsbcccc26-9e13-4c05-9d1d-23a8c3aad815: The system cannot find the file specified. (2)
[20932:18244:20240526,210144.989:ERROR filesystem_win.cc:130] GetFileAttributes C:UsersUserNameAppDataLocalTemp\AndroidEmulatoremu-crash-34.2.14.dbattachmentsc975c4f-3694-4da6-92b0-2f47681e2932: The system cannot find the file specified. (2)
[20932:18244:20240526,210144.989:ERROR directory_reader_win.cc:43] FindFirstFile: The system cannot find the path specified. (3)
[20932:18244:20240526,210146.361:ERROR filesystem_win.cc:130] GetFileAttributes C:UsersUserNameAppDataLocalTemp\AndroidEmulatoremu-crash-34.2.14.dbattachmentsbcccc26-9e13-4c05-9d1d-23a8c3aad815: The system cannot find the file specified. (2)
[20932:18244:20240526,210146.361:ERROR filesystem_win.cc:130] GetFileAttributes C:UsersUserNameAppDataLocalTemp\AndroidEmulatoremu-crash-34.2.14.dbattachmentsc975c4f-3694-4da6-92b0-2f47681e2932: The system cannot find the file specified. (2)
Address these issues and try again.

The things that I have tried:

  • recreate the C:flutter/directory
  • redefine the path
  • regenerate the emulator
  • toggle cold start option
  • enable hypervisor

What is weird is that the emulator worked for once. I had a phone on my screen that I could turn on and do stuff without any lag etc.

If anybody know anything about this issue I would really appreciate it,
Thanks in Advance

Note: I have an AMD Chip, Ryzen, could this be the issue?

2

Answers


  1. If you’re stuck as an alternative you can

    1. Use BlueStacks to emulate an android device.
      Download BlueStacks setup and then when you have it running. Then go the gear icon on the right > Advanced configs > mark "enable ADB connection" as true. Go to your terminal and input adb connect localhost:5555 . If this command gives you an error, go to gear icon on the right of BlueStacks emulator > Advanced configs > and you should see a specified local host then replace it: adb connect localhost: [the localhost you copied] . Go to your VS Code and you should see a new device among your device options. VS Code sees BlueStacks as a real phone

    2. Use a real phone and scrcpy to mirror it on your computer screen using a USB cable
      Download latest version of scrcpy, connect your android device to your computer using a usb cable. When you download the file scrcpy extract it and run the .exe file called scrcpy and follow the prompts.
      Once scrcpy is installed, you can launch it by double-clicking on the shortcut icon on your desktop. When you launch scrcpy, you will see a window on your desktop for a brief period of time. After that you should immediately start mirroring the android device connected to the computer.

    Login or Signup to reply.
  2. There is an error related to the emulator, so let’s check it one by one.

    1 Open Android studio
    2 Go to the tools section,
    3 open device manager and create a new emulator with different features.
    After applying these steps again
    Go to

    1 tools section
    2 Go to sdk manager section
    Check which SDK is selected from
    3 SDK platforms
    4 Then go to SDK Tools and check the missing SDKs. Those who write Android SDK and Android Emulator and Intel (may be different for you) should be compatible (I added the sample photo).
    After doing these steps
    5 Run the flutter doctor -v code in the terminal and check if there are any errors. if he doesn’t see the flutter
    From the system and environment variables section, go to the path section from the system variables, not the user variables, and paste the flutter bin path, for example C:Usersmuhammeddevflutterbin.
    After doing all these, the flutter emulator should work successfully.
    Make sure that the flutter and dart plug-ins are installed in Visual Studio Code, then press ctrl + shift + p for Windows, click on Flutter launch emulator from the menu that opens, select your emulator and wait for it to open, run your project after the emulator opens. If it still doesn’t work, you can use your phone as an emulator by connecting it via USB cable.

    1. Resim

    2. resim

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search