flutter - 使用现有项目打开 Android 模拟器
问题描述
我需要用我现有的项目重新打开 Android 模拟器。当我按下按钮从主文件“运行”项目时,我收到以下错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Unable to delete directory 'C:\Users\albat\code\hello_world\build\app\generated\not_namespaced_r_class_sources\debug\r\androidx' after 10 attempts
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 12s
此外,它不是我一直使用的“Pixel 2 API”设备,而是尝试使用“sdk gphone x86”进行渲染。
感谢您的帮助。
解决方案
从 android studio 中找到 android AVD 管理器。它将向您显示所有模拟器的列表。选择一个并单击运行。等待它启动,然后尝试再次运行您的应用程序。
让我知道这是否适合您。
推荐阅读
- html - 多次使用 br 标签来创建导航菜单是否合适?什么是更好的选择?
- python - 通过将数据帧的行和列索引与另一个数据帧的列匹配来重新格式化数据帧
- mongodb - Mongoose/MongoDB - 我可以通过映射包含的 id 数组来查找文档吗?
- python - 对将提取 html 代码并从网站显示它的 tkinter GUI 进行故障排除?
- c - 无符号整数的上溢和下溢
- javascript - 来自`function`的Javascript`new`的奇怪行为
- javascript - 'this' 隐含类型为 'any'
- pandas - 熊猫移动平均线日期
- mysql - MySQL 查询 - 加入 3 个表计数并按一列分组
- python - Python代码通过django shell而不是通过文件执行