VS Code Flutter 模拟器找不到需要的文件

问题描述 投票:0回答:1

我正在尝试将 Flutter 设置为 VS Code。我一直在观看一些视频来做到这一点,但在 Youtube 上似乎有效的内容对我不起作用。我已经设置了所有内容,但是当运行 flutter 创建的默认应用程序时,我无法在 Android 模拟器上运行它。

这是我得到的错误:

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:\Users\UserName\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.2.14.db\attachments\0bcccc26-9e13-4c05-9d1d-23a8c3aad815: The system cannot find the file specified. (2)
[16736:21260:20240526,210144.553:ERROR filesystem_win.cc:130] GetFileAttributes C:\Users\UserName\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.2.14.db\attachments\5711c4b0-2ae5-44dc-9e89-6636783173db: The system cannot find the file specified. (2)
[20932:18244:20240526,210144.593:ERROR filesystem_win.cc:130] GetFileAttributes C:\Users\UserName\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.2.14.db\attachments\0bcccc26-9e13-4c05-9d1d-23a8c3aad815: The system cannot find the file specified. (2)
[20932:18244:20240526,210144.593:ERROR filesystem_win.cc:130] GetFileAttributes C:\Users\UserName\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.2.14.db\attachments\5711c4b0-2ae5-44dc-9e89-6636783173db: The system cannot find the file specified. (2)
WARNING | Failed to process .ini file C:\Users\UserName\.android\avd\..\avd\flutter_emulator.avd\quickbootChoice.ini for reading.
added library vulkan-1.dll
[20932:21428:20240526,210144.981:ERROR filesystem_win.cc:130] GetFileAttributes C:\Users\UserName\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.2.14.db\attachments\0bcccc26-9e13-4c05-9d1d-23a8c3aad815: The system cannot find the file specified. (2)
[20932:18244:20240526,210144.989:ERROR filesystem_win.cc:130] GetFileAttributes C:\Users\UserName\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.2.14.db\attachments\0bcccc26-9e13-4c05-9d1d-23a8c3aad815: The system cannot find the file specified. (2)
[20932:18244:20240526,210144.989:ERROR filesystem_win.cc:130] GetFileAttributes C:\Users\UserName\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.2.14.db\attachments\0c975c4f-3694-4da6-92b0-2f47681e2932: The system cannot find the file specified. (2)
[20932:18244:20240526,210144.989:ERROR filesystem_win.cc:130] GetFileAttributes C:\Users\UserName\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.2.14.db\attachments\0bcccc26-9e13-4c05-9d1d-23a8c3aad815: The system cannot find the file specified. (2)
[20932:18244:20240526,210144.989:ERROR filesystem_win.cc:130] GetFileAttributes C:\Users\UserName\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.2.14.db\attachments\0c975c4f-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:\Users\UserName\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.2.14.db\attachments\0bcccc26-9e13-4c05-9d1d-23a8c3aad815: The system cannot find the file specified. (2)
[20932:18244:20240526,210146.361:ERROR filesystem_win.cc:130] GetFileAttributes C:\Users\UserName\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.2.14.db\attachments\0c975c4f-3694-4da6-92b0-2f47681e2932: The system cannot find the file specified. (2)
Address these issues and try again.

我尝试过的事情:

  • 重新创建C:flutter/目录
  • 重新定义路径
  • 重新生成模拟器
  • 切换冷启动选项
  • 启用虚拟机管理程序

奇怪的是模拟器曾经工作过一次。我的屏幕上有一部手机,我可以打开它并做一些事情,没有任何延迟等。

如果有人知道有关此问题的任何信息,我将非常感激, 预先感谢

注意: 我有 AMD 芯片,Ryzen,这可能是问题所在吗?

flutter android-emulator
1个回答
0
投票

这可能没有帮助,但我经历了你正在经历的过程;我还在 Youtube 上尝试了不同的视频,并在互联网上搜索解决方案,但无济于事,直到我放弃并安装 BlueStacks 并在其上模拟我的应用程序。如果您有最多 3GB 的额外空间(安装需要的空间少于 3GB,额外的空间是因为当我用 Bluestacks 运行我的应用程序时,它往往会很快耗尽空间),您可以在您的 PC 上安装 BlueStacks 并运行它。更好的是,如果您有一部 Android 手机,您可以用来运行您的应用程序,并且您可以使用 scrcpy 镜像您的手机屏幕并控制它,尽管它需要 USB 连接。 YouTube 上有精彩的视频,stackoverflow 上有帖子,可以帮助您为应用程序模拟设置 Bluestacks。如果您选择走这条路线,请询问,我会给您发送一些链接。

© www.soinside.com 2019 - 2024. All rights reserved.