首页 > 解决方案 > 如何将 Flutter 插件架构从 arm64 切换到 armv7

问题描述

当我尝试降低我的颤振应用程序的部署目标(iOS 12 到 9.3)时,我在运行时收到此错误flutter build ios

=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
    fatal error: lipo: -extract armv7 specified but fat file:
    /Users/xxx/development/myapp/build/ios/Release-iphoneos/Runner.app/Frameworks/flutter_webview_plugin.framework/flutter_webview_plugin does not contain that architecture
    Failed to extract armv7 for /Users/xxx/development/myapp/build/ios/Release-iphoneos/Runner.app/Frameworks/flutter_webview_plugin.framework/flutter_webview_plugin. Running
    lipo -info:
    Architectures in the fat file: /Users/xxx/development/myapp/build/ios/Release-iphoneos/Runner.app/Frameworks/flutter_webview_plugin.framework/flutter_webview_plugin are:
    arm64

我无法找到有关如何更改相关架构的任何信息 - 我什至可以这样做吗?或者这是插件开发人员必须构建的东西?

我希望能够以尽可能低的 iOS 版本运行该应用程序,以获得最大的兼容性。

标签: iosxcodeflutterdart

解决方案


在项目构建设置中,有一个名为 Architectures 的部分,您可以在其中设置您需要的部分。据我所知,最新的iPhone需要使用arm64,但在我的图片中你可以看到我也设置为有效的armv7,这似乎是你的问题。

在此处输入图像描述


推荐阅读