【问题标题】:Build error: Flutter was built without full bitcode构建错误:Flutter 是在没有完整位码的情况下构建的
【发布时间】:2021-08-13 01:45:17
【问题描述】:

在构建项目时出现此错误。所有目标和 pod 的 enable bitcode 都设置为 yes。

ld:无法生成位码包,因为 '...app/ios/Flutter/Flutter.framework/Flutter' 是在没有完整的情况下构建的 位码。位码的所有框架和 dylib 必须从 Xcode 存档或安装构建文件 '...app/ios/Flutter/Flutter.framework/Flutter' 用于架构 arm64

如何确保 Flutter 框架是使用完整的位码构建的?

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 1.22.4, on macOS 11.2.3 20D91 darwin-x64, locale en-US)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 12.5)
[!] Android Studio (version 4.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

【问题讨论】:

  • 您找到解决方案了吗?我观察到同样的问题。

标签: flutter bitcode


【解决方案1】:

找到了解决方案,codemagic slack 频道中的某个人不久前发布了它——这就是为什么您不应该使用 Slack 来获得支持:无法通过网络搜索找到。而是使用论坛。

在构建设置中包含config.build_settings['ENABLE_BITCODE'] = 'NO'

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

【讨论】:

    猜你喜欢
    • 2019-10-12
    • 1970-01-01
    • 1970-01-01
    • 2018-12-11
    • 2010-11-20
    • 2015-09-22
    • 1970-01-01
    • 1970-01-01
    • 2021-07-05
    相关资源
    最近更新 更多