未定义符号:Flutter iOS 上的 __swift_FORCE_LOAD_

问题描述 投票:0回答:1

我正在Mac M3上设置一个flutter项目。我收到以下错误

Running Xcode build...                                                  
 └─Compiling, linking and signing...                      2,794ms
Xcode build done.                                           36.8s
Failed to build iOS app
Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swift_Builtin_float


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swift_errno


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swift_math


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swift_signal


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swift_stdio


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swift_time


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swiftsys_time


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swiftunistd


Error (Xcode): Linker command failed with exit code 1 (use -v to see
invocation)


Could not build the application for the simulator.
Error launching application on iPhone 15 Pro Max.

操作系统:mac OS Sonama 版本 14.7 (23H124)

Xcode:15.4

颤动:3.22.2

ios swift flutter macos
1个回答
0
投票

我也遇到这个问题了。我发现这与Facebook的一些库的升级有关。这是错误日志:

CopyUndefined symbols for architecture x86_64:
  "__swift_FORCE_LOAD_$_swift_Builtin_float", referenced from:
      __swift_FORCE_LOAD_$_swift_Builtin_float_$_FBAudienceNetworkSwift in FBAudienceNetwork[x86_64][2](FBAudienceNetworkSwift.o)
      __swift_FORCE_LOAD_$_swift_Builtin_float_$_FBAdFilterEngine in FBAudienceNetwork[x86_64][3](FBAdFilterEngine.o)
      __swift_FORCE_LOAD_$_swift_Builtin_float_$_FBAdMAISKOverlayManager in FBAudienceNetwork[x86_64][4](FBAdMAISKOverlayManager.o)
      __swift_FORCE_LOAD_$_swift_Builtin_float_$_FBAudienceNetwork in FBAudienceNetwork[x86_64][406](FBAudienceNetwork.o)

我已更新 Podfile.lock 以使用这些版本的 Facebook 库:

- FBAEMKit (17.0.2):
    - FBSDKCoreKit_Basics (= 17.0.2)
- FBAudienceNetwork (6.15.1)
- FBSDKCoreKit (17.0.2):
    - FBAEMKit (= 17.0.2)
    - FBSDKCoreKit_Basics (= 17.0.2)
- FBSDKCoreKit_Basics (17.0.2)
© www.soinside.com 2019 - 2024. All rights reserved.