当我在 android studio 中为 sdk x86 arm (mobile) 编译我的颤振项目时,我突然在下面收到这个错误。到目前为止,一切都运行良好。昨天我将flutter升级到最新版本,之后编译项目没有问题。但是今天突然间我不知从哪里得到了这个错误。知道发生了什么吗?现在该怎么办?
Launching lib/main.dart on sdk gphone x86 arm in debug mode...
Running Gradle task 'assembleDebug'...
Unhandled exception:
Unexpected Kernel SDK Version 72c1995001 (expected 7c8c6b3053).
#0 BinaryBuilder._readAndVerifySdkHash (package:kernel/binary/ast_from_binary.dart:523:7)
#1 BinaryBuilder.readComponent.<anonymous closure> (package:kernel/binary/ast_from_binary.dart:555:7)
#2 Timeline.timeSync (dart:developer/timeline.dart:163:22)
#3 BinaryBuilder.readComponent (package:kernel/binary/ast_from_binary.dart:539:21)
#4 IncrementalCompiler.prepareSummary (package:front_end/src/fasta/incremental_compiler.dart:1647:12)
#5 IncrementalCompiler.ensurePlatformAndInitialize (package:front_end/src/fasta/incremental_compiler.dart:1138:23)
<asynchronous suspension>
#6 IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:229:11)
<asynchronous suspension>
#7 IncrementalCompiler.compile (package:vm/incremental_compiler.dart:69:29)
<asynchronous suspension>
#8 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:509:11)
<asynchronous suspension>
#9 listenAndCompile.<anonymous closure> (package:frontend_server/frontend_server.dart:1105:11)
<asynchronous suspension>
the Dart compiler exited unexpectedly.
the Dart compiler exited unexpectedly.
这是颤振医生的输出:
/Users/thanos/Desktop/Development/flutter_2_0_1/bin/flutter doctor --verbose
[✓] Flutter (Channel stable, 2.0.5, on macOS 11.2.3 20D91 darwin-x64, locale da-DK)
• Flutter version 2.0.5 at /Users/thanos/Desktop/Development/flutter_2_0_1
• Framework revision adc687823a (10 days ago), 2021-04-16 09:40:20 -0700
• Engine revision b09f014e96
• Dart version 2.12.3
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/thanos/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = /Users/thanos/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] Connected device (2 available)
• sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.85
• No issues found!