美文网首页
'xxxx' does not specify a Swift

'xxxx' does not specify a Swift

作者: _未可知 | 来源:发表于2019-06-24 17:00 被阅读0次

解决办法:

  1. 创建swift文件。使用Xcode打开Runner,


    1561365438383.jpg

快捷键Command+N,选择Swfit File,点击Next,弹出框选择,选择 Creat Bridge Header


1561365630040.jpg


然后你的文件里会多出一个Runner-Bridging-Header.h头文件(之后可以删除刚才创建的swift文件,只需要这个头文件即可)

  1. 打开iOS目录下的Podfile文件, 1561365116244.jpg

  添加 config.build_settings['SWIFT_VERSION'] = '4.2'

1561365165912.jpg

  添加 use_frameworks!

  1. XCode -> Build Settings -> SWIFT_VERSION == 4.2 1561366352611.jpg
  2. Android studio Terminal 执行 flutter clean
  3. 删除iOS -> Podfile.lock文件,


    1561366550672.jpg

    cd到iOS目录下,执行 pod install --repo-update。

👍

IOS build error, need 'SWIFT_VERSION'

相关文章

网友评论

      本文标题:'xxxx' does not specify a Swift

      本文链接:https://www.haomeiwen.com/subject/inyoqctx.html