0
votes

I'm currently working on a Flutter project named 'health_service' but Flutter is trying to compile other project named 'flare_test1' which was deleted and is in Trash.

I thought there might be a problen in cache. So I did flutter clean but the result is same.

Here's output of flutter doctor

[✓] Flutter (Channel unknown, v1.9.1+hotfix.2, on Mac OS X 10.14.6 18G95, locale ja-JP) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1) [✓] Xcode - develop for iOS and macOS (Xcode 10.3) [✓] Android Studio (version 3.4) [✓] VS Code (version 1.37.1) [✓] Connected device (1 available)

flutter --version

Flutter 1.9.1+hotfix.2 • channel unknown • unknown source Framework • revision 2d2a1ffec9 (9일 전) • 2019-09-06 18:39:49 -0700 Engine • revision b863200c37 Tools • Dart 2.5.0

Here's the log when I flutter run.

`Xcode's output: ↳

Unhandled exception: Crash when compiling package:flare_test1/main.dart, at character offset null: Unexpected Kernel version 30 (expected 29). #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) #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.. (package:front_end/src/fasta/compiler_context.dart:122:46) #9 new 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 (package:vm/kernel_front_end.dart:295:41) #20 FrontendCompiler.compile. (package:vm/frontend_server.dart:383:56) #21 new Future. (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 new 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 (package:vm/kernel_front_end.dart:295:41) #20 FrontendCompiler.compile. (package:vm/frontend_server.dart:383:56) #21 new Future. (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`
2

2 Answers

0
votes

This isn't fudamental solution, but I changed Flutter SDK version from v1.9.1+hotfix.2 (the latest stable version) to 1.7.8+hotfix.4 and it worked for now.

I'm gonna check release note and see differences between them. Thank you.

-1
votes

You Just Update Your Flutter

Flutter Upgrade run on terminal