You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter构建与clean命令随机卡住问题求助

Flutter项目构建及flutter clean命令随机卡住问题

问题现象及出现流程

  1. 通过ADB连接物理设备运行项目,初始可正常构建并运行;
  2. 随机出现卡在编译环节的情况,等待数小时仍无进展;
  3. 执行flutter clean命令时同样会卡住数小时,无法完成;
  4. 检查发现编译生成的资源文件中存在无扩展名的随机命名文件(如8043e5b2),实际为svg、png或jpeg格式,但在Windows系统下无法对其进行重命名、删除或修改操作;
  5. 仅能通过进入带CMD的安全模式执行删除操作才能移除该文件;
  6. 删除后可正常构建几次,但问题会再次出现,需重复进入安全模式删除构建文件。

已查阅Issue #36763,未解决该问题。

环境版本信息

$ flutter doctor -v
[√] Flutter (Channel stable, 3.3.10, on Microsoft Windows [Version 10.0.19045.2364], locale en-UK)
    • Flutter version 3.3.10 on channel stable at C:\Flutter\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (2 weeks ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Usname\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\xxxxx\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio未安装,Windows开发需依赖该工具,请安装包含所有默认组件的"Desktop development with C++"工作负载。

[√] Android Studio (version 2021.3)
    • Android Studio at C:\xxx\Android\Android Studio1
    • Flutter plugin可在插件市场安装
    • Dart plugin可在插件市场安装
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[√] VS Code (version 1.74.2)
    • VS Code at C:\mypathtoinstallation\Microsoft VS Code
    • Flutter extension version 3.56.0

[√] Connected device (4 available)
    •X683 (mobile) • 192.168.xx.xx:xxxx • android-arm64  • Android 
    • Windows (desktop)     • windows             • windows-x64    • Microsoft Windows [Version 10.0.19045.2364]
    • Chrome (web)          • chrome              • web-javascript • Google Chrome 108.0.5359.125
    • Edge (web)            • edge                • web-javascript • Microsoft Edge 108.0.1462.54

[√] HTTP Host Availability
    • All required HTTP hosts are available

内容的提问来源于stack exchange,提问作者king mort

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.06 05:51:32