使用swift 4.0编译的模块无法在swift 3.1中导入 [英] Module compiled with swift 4.0 cannot be imported in swift 3.1

查看:143
本文介绍了使用swift 4.0编译的模块无法在swift 3.1中导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显然我已经设法在Xcode 9 beta中构建我的项目,现在我只得到错误

Apparently I have managed to build my project in Xcode 9 beta and now I only get the error


使用swift 4.0编译的模块不能在swift 3.1中导入

Module compiled with swift 4.0 cannot be imported in swift 3.1

当我在Xcode 8中运行项目时。我的模块中的模块是Alamofire。我试图重新启动Xcode,但没有任何想法如何解决这个问题?

When I run the project in Xcode 8. The module in my case are Alamofire. I have tried to restart Xcode but nothing happens any ideas how to solve this issue?

推荐答案

你有两个选择你可以做:


清理项目,然后尝试重新构建您的解决方案和看看它是否有效。

You have two options that you can do:

Clean the project and then try to re-build your solution and see if it works.

如果它不起作用且您仍然收到相同的错误消息,请执行以下步骤,它应该适合您:

If it don´t work and you still get the same error message then do the following steps and it should work for you:


  1. 打开 podfile 并删除 Alamofire

  2. 运行 pod update

  3. 重新添加 Alamofire 到您的 podfile

  4. 运行 pod update

  5. 完成后,清理您的项目并运行它

  1. Open your podfile and remove Alamofire
  2. Run pod update
  3. Re-add Alamofire to your podfile
  4. Run pod update
  5. When this is done, clean your project and run it

这篇关于使用swift 4.0编译的模块无法在swift 3.1中导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆