我正在尝试使用Pods构建一个iOS(swift)项目,使用Travis CI,但我收到以下错误。
Analyzing dependencies
[!] The version of CocoaPods used to generate the lockfile (1.2.1.beta.1) is higher than the version of the current executable (1.2.0). Incompatibility issues may arise.
Pre-downloading: `SwiftValidator` from `https://github.com/jpotts18/SwiftValidator.git`, commit `2a6c23ad9efd76127f6109445515cb9780e5ad92`
[!] Unable to satisfy the following requirements:
- `Marshal (= 1.2.4)` required by `Podfile`
- `Marshal (= 1.2.4)` required by `Podfile.lock`
None of your spec sources contain a spec satisfying the dependency: `Marshal (= 1.2.4)`.
You have either:
* out-of-date source repos which you can update with `pod repo update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
The command "eval pod install " failed 3 times.
The command "pod install" failed and exited with 1 during .
这是我的.travis.yml
文件:
language: swift
osx_image: xcode8.3
branches:
only:
- develop
- master
env:
- LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8
before_install:
- rvm install ruby-2.2.2
- gem install cocoapods
- gem install xcpretty -N
- brew update
- brew install swiftlint || true
script:
- set -o pipefail
- xcodebuild -workspace Invision.xcworkspace -scheme Invision -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c
- swiftlint
通过日志阅读我可以看到Pod有问题。这是我的Podfile
platform :ios, '8.0'
target 'Invision' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Invision
pod 'ZLSwipeableViewSwift'
pod 'Moya'
pod 'Marshal', '1.2.4'
pod 'SwiftValidator', :git => 'https://github.com/jpotts18/SwiftValidator.git', :branch => 'master'
pod 'Log'
target 'InvisionTests' do
inherit! :search_paths
# Pods for testing
end
target 'InvisionUITests' do
inherit! :search_paths
# Pods for testing
end
end
我还读过如何解决问题,其中一些建议是:
pod update Marashl
- 无效
如何解决这个问题?
答案 0 :(得分:0)
看起来您使用CocoaPods 1.2.1.beta.1推送的代码,但Travis-CI支持1.2.0。 gem install cocoapods
安装稳定版的CocoaPods尝试安装测试版
答案 1 :(得分:0)
xcode8.3
尚未得到支持,因此您可能会被路由到默认图片xcode7.3
。请参阅https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version。
您可以试试 osx_image: xcode8.2
吗?
更新2017-05-15 :现在支持xcode8.3
:https://blog.travis-ci.com/2017-04-19-xcode-832-is-here。