Flutter升级到1.17.1 ios编译报FlutterMe
2020-05-29 本文已影响0人
819forever
最近将flutter sdk升级到了1.17.1,Android那边很顺利的编译过了,然而ios死活编译不过,一直在报错。

百度了各种办法都没有用,最后发现是xcode的一些配置问题。
解决办法:
1.首先确定自己的环境没问题,这个就不贴图了(我不是专业的ios,环境问题自行百度吧)
2.将项目中之前的编译垃圾先删除(这些都是自动生成的文件)

3.替换Podfile里面的东西(可以新建一个flutter项目,然后将新建项目中的Podfile中的内容全部复制过来)

4.切换xcode编译模式为Legacy Build System


5.查看自己Runner->edit Scheme是否正确


6.打开终端,进入到项目下,先flutter clean然后进入到ios目录下,执行pod install,完成后执行 pod update
最后用xcode打开,发现项目能正常运行了...
(ps:这个方法并不能保证对所有的人有用,至少我的项目是通过这种方式解决的。只是一种排查错误的方式,如果没用,勿喷哈。)