android - FLUTTER:任务':app:compileFlutterBuildDebug'执行失败无法创建父目录
问题描述
我从另一台 PC 复制了我的项目,并尝试在真实设备上运行我的应用程序,然后我得到了这个错误代码:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Failed to create parent directory 'C:\Users\user' when creating directory 'C:\Users\user\AndroidStudioProjects\app_name\android\app\build\intermediates\flutter\debug\flutter_assets'
* 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
我尝试使用flutter clean
但仍然相同
然后我的这个结果flutter doctor
:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.2, on Microsoft Windows [Version 10.0.19042.1237], locale en-ID)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Android Studio
[√] VS Code (version 1.60.2)
[√] Connected device (3 available)
• No issues found!
解决方案
我通过删除android/app 目录中的build文件夹解决了我的问题。
在这之后
扑干净
然后
颤振运行
推荐阅读
- assembly - 英特尔 TSX 前缀是否在 AMD 上作为 NOP 执行(安全)?
- excel - 删除符合条件的整行
- python - 在python中修剪字符串
- node.js - 将 MERN Stack 应用程序部署到 azure 应用服务
- python-3.x - 将pandas DataFrame列拆分为2的有效方法是什么
- sql - Oracle 12c 和 11g 的相关子查询工作方式不同
- c# - 统一设置实例化游戏对象精灵的 z 变换位置
- oracle - PLSQL通过循环索引获取变量
- pine-script - 将 Float 转换为 Int 值 Pine-script
- node.js - 如何修复、恢复问题 uid LocalStorage ReactJS/ NodeJs