The version of CocoaPods used to generate the lockfile

简介: The version of CocoaPods used to generate the lockfile

The version of CocoaPods used to generate the lockfile (1.12.1) is higher than the version of the current executable (1.11.3). Incompatibility issues may arise.

在我们使用cocoapods加载第三方库时,有时会碰到报这个错,这很明显是告诉我们现在所使用的cocoapods版本低于第三方库所要求的。


我们可以在终端中执行pod repo update 命令


如果执行pod repo update 命令报下面的错

Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down


再执行pod update --verbose --no-repo-update

然后再执行pod repo update

根据提示再更新sudo gem install cocoapods

若还报错,有可能个gem版本问题,采用下面操作。这种操作很彻底,但是很复杂,能解决所有问题,会遇到系统的ruby权限问题,后面会有文章专门解决。不过万不得已不要走下面的流程。

升级cocoapods需要一个正确的操作流程和命令语句。


1、更新gem:sudo gem update --system

2、删除gem源:gem sources --remove https://ruby.taobao.org/

3、修改gem源:gem sources -a https://gems.ruby-china.org

4、查看gem源是否是最新的:gem sources -l

5、升级cocoapods:sudo gem install -n /usr/local/bin cocoapods --pre

6、查看升级后的cocoapods版本:pod --version


目录
相关文章
|
Java Maven
maven install时报错The packaging for this project did not assign a file to the build artifact
maven install时报错The packaging for this project did not assign a file to the build artifact
6563 0
Plugin [id: ‘com.github.kt3k.coveralls‘, version: ‘2.8.2‘] was not found in any of the following sou
Plugin [id: ‘com.github.kt3k.coveralls‘, version: ‘2.8.2‘] was not found in any of the following sou
124 0
成功解决​​​​​​​安装pywin32时出现python version 3.6 required, which was not found in the registry
成功解决​​​​​​​安装pywin32时出现python version 3.6 required, which was not found in the registry
成功解决​​​​​​​安装pywin32时出现python version 3.6 required, which was not found in the registry
成功解决 安装pywin32时出现python version 3.6-32 required, which was not found in the registry
成功解决 安装pywin32时出现python version 3.6-32 required, which was not found in the registry
成功解决 安装pywin32时出现python version 3.6-32 required, which was not found in the registry
|
API 开发工具 Android开发
Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
941 0
Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
|
Android开发
ERROR: Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle
ERROR: Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle
2438 0
ERROR: Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle
成功解决​​​​​​​安装pywin32时出现python version 3.6 required, which was not found in the registry(二)
成功解决​​​​​​​安装pywin32时出现python version 3.6 required, which was not found in the registry
成功解决​​​​​​​安装pywin32时出现python version 3.6 required, which was not found in the registry(二)
成功解决​​​​​​​安装pywin32时出现python version 3.6 required, which was not found in the registry(一)
成功解决​​​​​​​安装pywin32时出现python version 3.6 required, which was not found in the registry
成功解决​​​​​​​安装pywin32时出现python version 3.6 required, which was not found in the registry(一)
成功解决You are using pip version 9.0.3, however version 10.0.1 is available. You should consider upgr
成功解决You are using pip version 9.0.3, however version 10.0.1 is available. You should consider upgr
成功解决You are using pip version 9.0.3, however version 10.0.1 is available. You should consider upgr
成功解决You are using pip version 9.0.1, however version 9.0.3 is available. You should consider upgra
成功解决You are using pip version 9.0.1, however version 9.0.3 is available. You should consider upgra
成功解决You are using pip version 9.0.1, however version 9.0.3 is available. You should consider upgra