这个错误已经阻止我的项目进展一段时间了,似乎没有什么对我有用。
我已将 A pod 添加到我的 swift 项目中,但是当我尝试将其导入我的应用程序时,出现此错误:
Could not find module 'ImagePicker' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator
Run Code Online (Sandbox Code Playgroud)
我进行了广泛的搜索并尝试了几乎所有的解决方案,但似乎仍然没有任何效果。
我正在使用最新的 Xcode。
我需要做些什么来解决这个问题,因为这阻止了我构建应用程序。
我在 M1 笔记本电脑上也遇到同样的问题。您是否尝试过这个解决方案:
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
Run Code Online (Sandbox Code Playgroud)
或者,您可以将默认方案更改为“发布”,而不是“调试”,方法是转到顶部菜单Product -> Scheme -> Edit Scheme
,选择“运行方案”作为“发布”。
然而,更好的解决方案是简单地确保您正在使用 Rosetta 运行 Xcode。Get Info
简单地在 Xcode 图标上执行此操作,然后在弹出窗口中确保Open using Rosetta
选中该图标
归档时间: |
|
查看次数: |
19576 次 |
最近记录: |