最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

dart - App not building for iOS and Android after upgrading Flutter - Stack Overflow

programmeradmin1浏览0评论

I have been using Flutter with Firebase etc for an iOT app at my company. Day before yesterday afternoon (Monday) I upgraded Flutter because last week when we released a update we received a notification from Apple saying that we need to upgrade to new versions of everything. But this basically broke my flutter completely. I have not been able to build a single version for both Android and iOS (Not even the debug one). For Android they were initially saying that the way the build.gradles etc are written need to be updated and I did that but then they switched to other errors which keep on coming and this one I cannot solve. Then I tried iOS because I wanted to at least solve one thing but with iOS as well I got multiple errors with different dependencies which I fixed but now it is failing to build but is not showing any error exactly. Please help me.

This is what iOS build shows but I wasn't building for a device and I don't know what exception is unhadled.

Running Xcode build...                                                  
Xcode build done.                                           231.6s
Failed to build iOS app
Error (Xcode): Unhandled exception:
Encountered error while building for device.

-----> After verbose doctore
[✓] Xcode - develop for iOS and macOS (Xcode 15.4) [157.7s]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.16.2

For android after fixing everything like Java version etc, it gives this error. According to chatgpt, it is because the dart version is not compatible with the flutter version but the dart version being used was downloaded with the flutter version during the upgrade. It's not like I downloaded anything else separately and I did everything chat gpt but nothing seems to fix it.

Unhandled exception:
Unexpected Kernel Format Version 106 (expected 122)
#0      BinaryBuilder._verifyComponentInitialBytes (package:kernel/binary/ast_from_binary.dart:871)
#1      BinaryBuilder.readComponent.<anonymous closure> (package:kernel/binary/ast_from_binary.dart:697)
#2      Timeline.timeSync (dart:developer/timeline.dart:188)
#3      BinaryBuilder.readComponent (package:kernel/binary/ast_from_binary.dart:695)
#4      _InitializationFromSdkSummary._prepareSummary (package:front_end/src/base/incremental_compiler.dart:2536)
#5      _InitializationFromSdkSummary.initialize (package:front_end/src/base/incremental_compiler.dart:2518)
<asynchronous suspension>
#6      IncrementalCompiler._ensurePlatformAndInitialize (package:front_end/src/base/incremental_compiler.dart:1405)
<asynchronous suspension>
#7      IncrementalCompilerputeDelta.<anonymous closure> (package:front_end/src/base/incremental_compiler.dart:293)
<asynchronous suspension>
#8      CompilerContext.clear (package:front_end/src/base/compiler_context.dart:77)
<asynchronous suspension>
#9      IncrementalCompilerpile (package:vm/incremental_compiler.dart:77)
<asynchronous suspension>
#10     FrontendCompilerpile (package:frontend_server/frontend_server.dart:642)
<asynchronous suspension>
#11   
  starter (package:frontend_server/starter.dart:109)
<asynchronous suspension>
#12     main (file:///Volumes/Work/s/w/ir/x/w/sdk/pkg/frontend_server/bin/frontend_server_starter.dart:13)

<asynchronous suspension>

Target kernel_snapshot_program failed: Exception
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.

I reinstalled Flutter and Dart SDK by clearing the cache, pulling the latest stable version from the Flutter repository, and running flutter doctor. I expected this to resolve the issue with missing Dart SDK files but it did not.

Any help would be amazing.

Thank you in Advance!

发布评论

评论列表(0)

  1. 暂无评论