Flutter学习笔记--用原生工程打包时报错的解决办法

在原生的iOS工程里面,嵌套了flutter模块,进行打包时,报以下错误:
ld: bitcode bundle could not be generated because ‘/Users/—/ios/Flutter/Flutter.framework/Flutter’ was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file ‘/Users/—r/ios/Flutter/Flutter.framework/Flutter’ for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) Search for Enable Bitcode setting and set it to YES for Debug and Release modes.

从报错信息来看,该报错信息是因为flutter模块里面的内容不是全部支持bitcode导致的,但我将项目里面的Enable Bitcode设置为NO时,并没有解决问题:
Flutter学习笔记--用原生工程打包时报错的解决办法

最后在Stack Overflow上面找到了答案,正确操作是:不需要将Enable Bitcode设置为NO,在flutter项目里面,依次执行以下命令:
flutter clean
flutter build ios

然后再在原生工程里面做正常的打包操作,成功!!