简体   繁体   中英

Getting error while building iOS app from flutter

I am trying to build iOS app from flutter and getting below errors.

在此处输入图片说明

Read https://github.com/flutter/flutter/issues/17749

Check Configuration here

In Short:

Flutter frameworks contain armv7, arm64, and x86_64 slices but NOT i386. When you run in the simulator, Xcode silently maps armv7 to i386 simulator and arm64 to the x86_64 simulator. ONLY_ACTIVE_ARCH=YES build setting builds only for the architecture of the device or simulator you are targeting. Xcode docs:

If enabled, only the active architecture is built. This setting will be ignored when building with a run destination which does not define a specific architecture, such as a 'Generic Device' run destination.

So if you are targeting a real recent iOS device, it will build arm64, and if you target a recent simulator, it will build x86_64. ONLY_ACTIVE_ARCH=YES is the default for the Debug build configuration for new Xcode projects.

If you have ONLY_ACTIVE_ARCH=NO and target a real device, it will build armv7 and arm64 and will succeed. If you target a simulator, it will try to build i386 and x86_64 and fail with this error because i386 is missing. ONLY_ACTIVE_ARCH=NO is the default for Release build configurations for new Xcode projects because you need to publish all valid architectures to the App Store.

Flutter is not supported in Release on the simulator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM