Pod 安装错误后,Swift 3 结果出现编译错误

     2023-02-24     233

关键词:

【中文标题】Pod 安装错误后,Swift 3 结果出现编译错误【英文标题】:Swift 3 results with compile errors after Pod install error 【发布时间】: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吗? 【参考方案1】:
    i)Clean(cmd+shift+k )

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

【讨论】:

pod安装后Xcode 8 swift pod标头为空

】pod安装后Xcode8swiftpod标头为空【英文标题】:Xcode8swiftpodheadersemptyafterpodinstall【发布时间】:2016-06-2419:36:21【问题描述】:我正在尝试编译一个用swift编写的现有xcode项目。该项目使用Alamofire。我安装了xcode8beta并打开了项目。Ala... 查看详情

Pod 更新后编译 Swift 3.0.1 项目时出错

】Pod更新后编译Swift3.0.1项目时出错【英文标题】:ErrorcompilingSwift3.0.1ProjectafterPodUpdate【发布时间】:2017-05-1317:38:38【问题描述】:我最近使用XCodeSwiftMigrator将我的Swift2.3SDK项目迁移到了Swift3。这样做之后,我更新了我的pod依赖项... 查看详情

使用 pod install 后出现 Swift 错误(clang:错误:链接器命令失败,退出代码为 1)

】使用podinstall后出现Swift错误(clang:错误:链接器命令失败,退出代码为1)【英文标题】:Swifterrorafterusingpodinstall(clang:error:linkercommandfailedwithexitcode1)【发布时间】:2016-01-0518:00:18【问题描述】:我已经尝试解决此问题3小时,... 查看详情

安装 Firebase pod 后出现链接器错误

】安装Firebasepod后出现链接器错误【英文标题】:LinkererrorafterinstallingFirebasepod【发布时间】:2017-04-2106:42:23【问题描述】:我是iOS应用开发的初学者。我目前正在做一个需要从Parse更改为Firebase的项目。我按照firebase站点的指示安... 查看详情

从 pod 安装框架后,无法在 Swift 项目的类中导入,抛出错误 no such module swift import

】从pod安装框架后,无法在Swift项目的类中导入,抛出错误nosuchmoduleswiftimport【英文标题】:Afterinstalledframeworkfrompods,notabletoimportinclassinSwiftproject,Throwinganerrornosuchmoduleswiftimport【发布时间】:2018-12-1304:23:23【问题描述】:ObjectiveCBr... 查看详情

Moya 构建错误

...误。不服气,新建了一个项目,设置了pod并添加了Moya并安装了pod。出现了同一组构建时编译器错误。我在MoyaGitHubrepo的问题中没有发现任何问题。如果有帮助,请使用XCode8.2.1和swift3。【问题讨论】:对我来说似乎是swift3错误我... 查看详情

新项目成功运行后立即出现完整项目 Swift 编译错误

】新项目成功运行后立即出现完整项目Swift编译错误【英文标题】:FullProjectSwiftCompileErrorImmediatelyAfterSuccessfulRunwithaNewProject【发布时间】:2018-11-0515:15:10【问题描述】:我在模拟器中成功运行了我的Swift4.2项目。当我停止模拟器... 查看详情

更新到 swift 3 后出现很多错误

】更新到swift3后出现很多错误【英文标题】:Manyerrorsafterupdatetoswift3【发布时间】:2016-09-0708:14:55【问题描述】:您好,我正在使用parse开发swift2,然后我刚刚更新到swift3我遇到了很多错误,该应用程序运行良好。以下是一些我... 查看详情

更新到 Xcode 9 / Swift 4 后 AVCapture 出现奇怪的编译错误 [重复]

】更新到Xcode9/Swift4后AVCapture出现奇怪的编译错误[重复]【英文标题】:WeirdcompileerrorwithAVCaptureafterupdatingtoXcode9/Swift4[duplicate]【发布时间】:2017-09-1419:53:46【问题描述】:我有一个普通的UIViewController,它使用AVCapturePhoto,我在其中... 查看详情

尝试导入 web3swift 时出现编译错误

】尝试导入web3swift时出现编译错误【英文标题】:Compileerrorwhentryingtoimportweb3swift【发布时间】:2018-09-2607:02:24【问题描述】:我正在尝试将web3swift导入我的Swift文件之一,但出现编译器错误没有这样的模块\'web3swift\'"。导入语句... 查看详情

Alamofire 在 Swift 3、Xcode 8 中出现错误

】Alamofire在Swift3、Xcode8中出现错误【英文标题】:AlamofiregiveserrorinSwift3,Xcode8【发布时间】:2017-05-1713:08:46【问题描述】:到目前为止,我在Xcode7.3.1、Swift2中使用Alamofire。但现在我想迁移到Swift3。我使用pod来更新Alamofire库。现在... 查看详情

在 Swift 中使用 Firebase - pod 安装错误

】在Swift中使用Firebase-pod安装错误【英文标题】:UsingFirebaseinSwift-podinstallerror【发布时间】:2019-09-2417:37:53【问题描述】:我目前正在编写一个使用Firebase的Swift应用程序,这只是YouTube上的一门课程。我创建了一个PodFile来尝试安... 查看详情

升级到 React Native 0.63.0 后 Pod 安装错误

】升级到ReactNative0.63.0后Pod安装错误【英文标题】:PodinstallerrorafterupgradingtoReactNative0.63.0【发布时间】:2020-07-1609:16:58【问题描述】:我使用的是ReactNative版本0.62.2,现在我升级到版本0.63.0并在运行npxpod-install以安装Pod包后出现此... 查看详情

Xcode:Pod 安装后构建失败(错误:链接器命令失败,退出代码 1)

】Xcode:Pod安装后构建失败(错误:链接器命令失败,退出代码1)【英文标题】:Xcode:Buildfailsafterpodinstallation(error:LinkercommandfailedwithexitCode1)【发布时间】:2020-10-3017:51:00【问题描述】:拜托,你能帮我解决这个ios问题吗?我使... 查看详情

“无法确定以下 pod 的 Swift 版本” - 错误

...【发布时间】:2019-11-0410:19:01【问题描述】:我正在尝试安装pod\'SVProgressHUD\'cocoapod,但在安装pod文件时出现以下错误。[!]UnabletodetermineSwiftversionforthefollow 查看详情

Cocoapods - 使用 Swift 3.0 编译的模块无法在 Swift 3.0.1 中导入

...7-03-2403:37:24【问题描述】:刚刚更新到Xcodev8.1并正在尝试安装一个pod。但是,一旦我导入它,Xcode就会给我一个错误提示ModuleCompiledwithSwift 查看详情

安装 Pod 后 FBSDKLoginKit 中断

】安装Pod后FBSDKLoginKit中断【英文标题】:FBSDKLoginKitbreaksafterpodsinstallation【发布时间】:2016-02-1518:58:42【问题描述】:通过CocoaPods安装FBSDKLoginKit后,出现构建错误选择器\'areAllPermissionsReadPermissions:\'没有已知的类方法没有已知的... 查看详情

在 x 代码 10.1 中将 pod 更新到 FBSDK 5.0.0 后出现错误

...题描述】:我正在尝试将我的facebookSDK更新到5.0.0,但在安装podupdate后,我在FBSDKLoginKit中不断收到此错误。这是我的pod文件。pod\'FacebookSDK\',\'~& 查看详情