捆绑执行 pod 安装 -> 找不到具有 URL "trunk"的已知源



我正在遵循Xcode存储库的一些说明。

$ bundle exec pod install
Analyzing dependencies
[!] The version of CocoaPods used to generate the lockfile (1.9.3) is higher than the version of the 
current executable (1.6.1). Incompatibility issues may arise.

我认为这导致了错误:

Failed to find known source with the URL "trunk"

当我检查pods的版本时,我得到:

$ pod --version
1.10.0

我的假设(但我可能错了(是,我要么需要运行命令,让它运行pod的新版本,要么我需要在不同的地方安装新版本。

添加信息(根据评论请求(

$ gem list pod
*** LOCAL GEMS ***
cocoapods (1.10.1, 1.10.0)
cocoapods-core (1.10.1, 1.10.0)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.4.0)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.0)
cocoapods-trunk (1.5.0)
cocoapods-try (1.2.0)

$ grep -i pod Gemfile.lock
cocoapods (1.6.1)
cocoapods-core (= 1.6.1)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.3.1, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
cocoapods-core (1.6.1)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.2.2)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.3.1)
cocoapods-try (1.1.0)
cocoapods

我已经多次遇到这个问题,但不知道为什么。要修复此问题,我在项目目录中运行以下终端命令:

sudo gem install cocoapods-deintegrate cocoapods-clean(仅当您没有安装cocoapods-deintegratecocoapods-clean时(

pod deintegrate

pod clean

pod setup

pod install

据我所知,这将完全清除并重新安装pod文件。再次,我不确定是什么原因导致问题开始,但这对我有效。

最新更新