flutter - 构建错误:Flutter 是在没有完整位码的情况下构建的
问题描述
构建项目时出现此错误。所有目标和 pod 都将启用位码设置为是。
ld:无法生成位码包,因为“...app/ios/Flutter/Flutter.framework/Flutter”是在没有完整位码的情况下构建的。位码的所有框架和 dylib 必须从 Xcode 存档生成或安装构建文件'...app/ios/Flutter/Flutter.framework/Flutter' 用于架构 arm64
如何确保颤振框架是用完整的位码构建的?
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.
解决方案
找到了解决方案,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
推荐阅读
- google-apps-script - Google表格复制行到新表格IF公式触发器
- dart - 用于导航流的 Flutter Bloc
- ios - 禁用特定标签栏项目排序的最佳方法
- powershell - 使用 powershell 验证不同 Windows 服务器上的组策略设置 (GPedit.msc)
- c# - SQL LEFT OUTER JOIN COUNT() GROUPBY 转换为实体框架
- python - 使用python boto3从s3递归复制数据更改文件夹结构
- variables - Sass 重构变量作为选择器
- docker - 具有 Docker 架构的多个 Web 应用程序
- css - 根据以下元素将样式应用于 CSS 中的元素
- c# - 如何在自定义控件中使用自定义单元格渲染器