我目前正在开发一个名为'health_service'的Flutter项目,但是Flutter试图编译另一个名为'flare_test1'的项目,该项目已删除并且位于垃圾箱中。
我认为高速缓存中可能存在问题。
所以我做了flutter clean
,但是结果是一样的。
这里是flutter doctor
[✓] Flutter(频道未知,v1.9.1 + hotfix.2,在Mac OS X 10.14.6上 18G95,语言环境ja-JP)[✓] Android工具链-为Android开发 设备(Android SDK版本29.0.1)[✓] Xcode-为iOS和 macOS(Xcode 10.3)[✓] Android Studio(版本3.4)[✓] VS代码 (1.37.1版)[✓]已连接的设备(1个可用)
flutter --version
Flutter 1.9.1 + hotfix.2•通道未知•未知源框架• 版本2d2a1ffec9(9月전)•2019-09-06 18:39:49 -0700引擎• 版本b863200c37工具•Dart 2.5.0
这是我flutter run
时的日志。
`Xcode的输出: ↳
未处理的异常: 编译package:flare_test1 / main.dart时崩溃, 在字符偏移量为null时: 意外的内核版本30(预期的29)。 #0 BinaryBuilder.readComponent(package:内核/binary/ast_from_binary.dart:450:7) #1 ProcessedOptions.loadComponent(package:front_end / src / base / processed_options.dart:393:10) #2 ProcessedOptions.loadSdkSummary(包:front_end / src / base / processed_options.dart:331:32) #3 generateKernelInternal。 (package:front_end / src / kernel_generator_impl.dart:82:42) #4 withCrashReporting(package:front_end / src / fasta / crash.dart:122:24) #5 generateKernelInternal(package:front_end / src / kernel_generator_impl.dart:69:10) #6 kernelForProgramInternal。 (package:front_end / src / api_prototype / kernel_generator.dart:60:35) #7 CompilerContext.runWithOptions。 (package:front_end / src / fasta / compiler_context.dart:134:20) #8 CompilerContext.runInContext .. (包:front_end / src / fasta / compiler_context.dart:122:46) #9新的Future.sync(dart:async / future.dart:224:31) #10 CompilerContext.runInContext。 (package:front_end / src / fasta / compiler_context.dart:122:19) #11 _rootRun(dart:async / zone.dart:1124:13) #12 _CustomZone.run(dart:async / zone.dart:1021:19) #13 _runZoned(dart:async / zone.dart:1516:10) #14 runZoned(dart:async / zone.dart:1463:12) #15 CompilerContext.runInContext(package:front_end / src / fasta / compiler_context.dart:121:12) #16 CompilerContext.runWithOptions(package:front_end / src / fasta / compiler_context.dart:132:10) #17 kernelForProgramInternal(package:front_end / src / api_prototype / kernel_generator.dart:59:32) #18 kernelForProgram(package:front_end / src / api_prototype / kernel_generator.dart:51:17) #19 compileToKernel(软件包:vm / kernel_front_end.dart:295:41) #20 FrontendCompiler.compile。 (软件包:vm / frontend_server.dart:383:56) #21新的未来。 (dart:async / future.dart:176:37) #22 _rootRun(dart:async / zone.dart:1120:38) #23 _CustomZone.run(dart:async / zone.dart:1021:19) #24 _CustomZone.runGuarded(dart:async / zone.dart:923:7) #25 _CustomZone.bindCallbackGuarded。 (dart:async / zone.dart:963:23) #26 _rootRun(dart:async / zone.dart:1124:13) #27 _CustomZone.run(dart:async / zone.dart:1021:19) #28 _CustomZone.bindCallback。 (dart:async / zone.dart:947:23) #29 Timer._createTimer。 (dart:async-patch / timer_patch.dart:21:15) #30 _Timer._runTimers(dart:isolate-patch / timer_impl.dart:382:19) #31 _Timer._handleMessage(dart:isolate-patch / timer_impl.dart:416:5) #32 _RawReceivePortImpl._handleMessage(dart:isolate-patch / isolate_patch.dart:172:12)
#0 BinaryBuilder.readComponent (package:kernel/binary/ast_from_binary.dart:450:7) #1 ProcessedOptions.loadComponent (package:front_end/src/base/processed_options.dart:393:10) #2 ProcessedOptions.loadSdkSummary (package:front_end/src/base/processed_options.dart:331:32) <asynchronous suspension> #3 generateKernelInternal.<anonymous closure> (package:front_end/src/kernel_generator_impl.dart:82:42) <asynchronous suspension> #4 withCrashReporting (package:front_end/src/fasta/crash.dart:122:24) <asynchronous suspension> #5 generateKernelInternal (package:front_end/src/kernel_generator_impl.dart:69:10) <asynchronous suspension> #6 kernelForProgramInternal.<anonymous closure> (package:front_end/src/api_prototype/kernel_generator.dart:60:35) <asynchronous suspension> #7 CompilerContext.runWithOptions.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:134:20) <asynchronous suspension> #8 CompilerContext.runInContext.<anonymous closure>.<anonymous closure>
(package:front_end / src / fasta / compiler_context.dart:122:46) #9新的Future.sync(dart:async / future.dart:224:31) #10 CompilerContext.runInContext。 (package:front_end / src / fasta / compiler_context.dart:122:19) #11 _rootRun(dart:async / zone.dart:1124:13) #12 _CustomZone.run(dart:async / zone.dart:1021:19) #13 _runZoned(dart:async / zone.dart:1516:10) #14 runZoned(dart:async / zone.dart:1463:12) #15 CompilerContext.runInContext(package:front_end / src / fasta / compiler_context.dart:121:12) #16 CompilerContext.runWithOptions(package:front_end / src / fasta / compiler_context.dart:132:10) #17 kernelForProgramInternal(package:front_end / src / api_prototype / kernel_generator.dart:59:32) #18 kernelForProgram(package:front_end / src / api_prototype / kernel_generator.dart:51:17) #19 compileToKernel(软件包:vm / kernel_front_end.dart:295:41) #20 FrontendCompiler.compile。 (软件包:vm / frontend_server.dart:383:56) #21新的未来。 (dart:async / future.dart:176:37) #22 _rootRun(dart:async / zone.dart:1120:38) #23 _CustomZone.run(dart:async / zone.dart:1021:19) #24 _CustomZone.runGuarded(dart:async / zone.dart:923:7) #25 _CustomZone.bindCallbackGuarded。 (dart:async / zone.dart:963:23) #26 _rootRun(dart:async / zone.dart:1124:13) #27 _CustomZone.run(dart:async / zone.dart:1021:19) #28 _CustomZone.bindCallback。 (dart:async / zone.dart:947:23) #29 Timer._createTimer。 (dart:async-patch / timer_patch.dart:21:15) #30 _Timer._runTimers(dart:isolate-patch / timer_impl.dart:382:19) #31 _Timer._handleMessage(dart:isolate-patch / timer_impl.dart:416:5) #32 _RawReceivePortImpl._handleMessage(dart:isolate-patch / isolate_patch.dart:172:12)
Compiler failed on /Users/Yoji_work/StudioProjects/health_service/flutter_app/lib/main.dart Failed to package /Users/Yoji_work/StudioProjects/health_service/flutter_app. Command PhaseScriptExecution failed with a nonzero exit code note: Using new build systemnote: Planning buildnote: Constructing build description`
答案 0 :(得分:0)
这不是基本的解决方案,但是我将Flutter SDK版本从v1.9.1 + hotfix.2(最新的稳定版本)更改为1.7.8 + hotfix.4,并且现在可以使用了。
我要查看发行说明,看看它们之间的差异。 谢谢。
答案 1 :(得分:-1)
您只需更新Flutter
Flutter Upgrade
在终端上运行