在最新检查期间无法捕获任务':app:compileFlutterBuildDebugArm'属性'outputDirectory'的输出文件的指纹

时间:2019-08-20 14:01:09

标签: debugging flutter dart

我尝试调试我的应用程序,但它向我展示了这一点:

What went wrong:
Failed to capture fingerprint of output files for task ':app:compileFlutterBuildDebugArm' property 'outputDirectory' during up-to-date check.
Could not read path 'C:\Users\(myuser)\Documents\pop_up\build\app\intermediates\flutter\debug\android-arm\flutter_assets\fonts'
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.
BUILD FAILED in 1s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

命令

flutter build bundle --target C:\ Users(myuser)\ Documents \ pop_up \ lib \ main.dart --target-platform android-arm --filesystem-scheme org-dartlang-root --track-widget-创建--depfile C:\ Users(myuser)\ Documents \ pop_up \ build \ app \ intermediates \ flutter \ debug \ android-arm / snapshot_blob.bin.d --asset-dir C:\ Users(myuser)\ Documents \ pop_up \ build \ app \ intermediates \ flutter \ debug \ android-arm / flutter_assets --debug

例外

FileSystemException:FileSystemException:删除失败,路径='C:\ Users(myuser)\ Documents \ pop_up \ build \ app \ intermediates \ flutter \ debug \ android-arm / flutter_assets'(操作系统错误:El Directorio noestávacío 。 ,errno = 145)

#0      _Directory._deleteSync (dart:io/directory_impl.dart:206:7)
#1      FileSystemEntity.deleteSync (dart:io/file_system_entity.dart:464:47)
#2      ForwardingFileSystemEntity.deleteSync (package:file/src/forwarding/forwarding_file_system_entity.dart:72:16)
#3      writeBundle (package:flutter_tools/src/bundle.dart:181:15)
<asynchronous suspension>
#4      assemble (package:flutter_tools/src/bundle.dart:172:9)
<asynchronous suspension>
#5      BundleBuilder.build (package:flutter_tools/src/bundle.dart:115:11)
<asynchronous suspension>
#6      BuildBundleCommand.runCommand (package:flutter_tools/src/commands/build_bundle.dart:119:25)
<asynchronous suspension>
#7      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:490:18)
<asynchronous suspension>
#8      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:407:33)
<asynchronous suspension>
#9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#10     _rootRun (dart:async/zone.dart:1124:13)
#11     _CustomZone.run (dart:async/zone.dart:1021:19)
#12     _runZoned (dart:async/zone.dart:1516:10)
#13     runZoned (dart:async/zone.dart:1463:12)
#14     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#15     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:397:20)
#16     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
<asynchronous suspension>
#17     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:402:21)
<asynchronous suspension>
#18     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#19     _rootRun (dart:async/zone.dart:1124:13)
#20     _CustomZone.run (dart:async/zone.dart:1021:19)
#21     _runZoned (dart:async/zone.dart:1516:10)
#22     runZoned (dart:async/zone.dart:1463:12)
#23     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#24     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:356:19)
<asynchronous suspension>
#25     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#26     new Future.sync (dart:async/future.dart:224:31)
#27     CommandRunner.run (package:args/command_runner.dart:112:14)
#28     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:242:18)
#29     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:22)
<asynchronous suspension>
#30     _rootRun (dart:async/zone.dart:1124:13)
#31     _CustomZone.run (dart:async/zone.dart:1021:19)
#32     _runZoned (dart:async/zone.dart:1516:10)
#33     runZoned (dart:async/zone.dart:1500:12)
#34     run.<anonymous closure> (package:flutter_tools/runner.dart:61:18)
<asynchronous suspension>
#35     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#36     _rootRun (dart:async/zone.dart:1124:13)
#37     _CustomZone.run (dart:async/zone.dart:1021:19)
#38     _runZoned (dart:async/zone.dart:1516:10)
#39     runZoned (dart:async/zone.dart:1463:12)
#40     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#41     runInContext (package:flutter_tools/src/context_runner.dart:58:24)
<asynchronous suspension>
#42     run (package:flutter_tools/runner.dart:50:10)
#43     main (package:flutter_tools/executable.dart:65:9)
<asynchronous suspension>
#44     main (file:///C:/src/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#45     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
#46     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

颤抖的医生

[✓] Flutter (Channel master, v1.9.1-pre.109, on Microsoft Windows [Versión 10.0.16299.1087], locale es-AR)
    • Flutter version 1.9.1-pre.109 at C:\src\flutter
    • Framework revision ce6dedfc0c (9 hours ago), 2019-08-20 01:03:36 -0400
    • Engine revision 10167db433
    • Dart version 2.5.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at C:\Users\(myuser)\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.4)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 38.2.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] VS Code (version 1.37.1)
    • VS Code at C:\Users\(myuser)\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.3.0

[✓] Connected device (1 available)
    • LG H440AR • LGH440ARad51902f • android-arm • Android 5.0.1 (API 21)

• No issues found!

2 个答案:

答案 0 :(得分:0)

您是否删除了资产文件夹中的某些文件,而您也在pubspec.yaml上引用了该文件?如果是这样,那就是无法构建应用程序的原因,请尝试删除对已删除文件(应用程序的pubspec.yaml中不存在的文件)的引用,然后再次运行项目以查看其是否成功构建。

答案 1 :(得分:0)

似乎是某种文件锁定问题...当尝试打开输出中指定的路径时,Windows资源管理器实际上返回“访问被拒绝”,因此我无法访问该文件夹并且无法更改安全性。 重新启动后,即可访问该文件夹。

什么对我有用(目前且仅按照确切的顺序):

  1. 在VS Code中打开另一个文件夹(如果正在使用)。如果整个过程都不​​起作用,请重新启动计算机
  2. “干净整洁”命令
  3. 调试