【问题标题】:Swift 3 results with compile errors after Pod install errorPod 安装错误后,Swift 3 结果出现编译错误
【发布时间】:2016-09-23 13:56:32
【问题描述】:

从 Swift 2.3 迁移到 Swift 3 后,出现以下编译错误:

第一:

错误:无法从“目标支持文件/Alamofire-watchOS/Alamofire-watchOS.modulemap”读取模块映射内容:错误域=NSCocoaErrorDomain Code=260 “无法打开文件“Alamofire-watchOS.modulemap”因为没有这样的文件。”

第二:

错误:无法从“目标支持文件/SwiftyJSON-watchOS/SwiftyJSON-watchOS.modulemap”读取模块映射内容:错误域=NSCocoaErrorDomain Code=260“文件“SwiftyJSON-watchOS.modulemap”无法打开因为没有这样的文件。”

Pod 文件:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'Alamofire', '~> 3.4'
pod 'HanekeSwift'
pod 'Google/Analytics', '~> 1.0.0'
pod 'MBProgressHUD', '~> 0.9.1'

target 'MyApp' do
    pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
    pod 'Alamofire', '~> 3.4'
end

target 'MyApp Watch app Extension' do
    platform :watchos, '3.0'
    pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
    pod 'Alamofire', '~> 3.4'
end

target 'MyAppTests' do

end

pod 安装错误:

TEMPLATE END

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:

https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...
Found no similar issues. To create a new issue, please visit:
https://github.com/cocoapods/cocoapods/issues/new

【问题讨论】:

  • 你使用 Cocoapods 吗?
  • @bogdanf 是的。
  • 你更新 cocoapods 了吗?您的 Podfile 中有什么?
  • 把它放在问题中。不要将代码放入评论中。
  • 你能试试干净的pod install吗?

标签: ios swift cocoapods watchkit swift3


【解决方案1】:
    i)Clean(cmd+shift+k )

    ii)Pod Update 
    iii)Run (cmd+r)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-10-30
    • 2020-08-16
    • 1970-01-01
    • 2020-06-06
    • 1970-01-01
    • 1970-01-01
    • 2017-07-21
    相关资源
    最近更新 更多