2017-03-11 55 views
0

我正在尝试使用Travis构建一个带有Pod的iOS(swift)项目,但我收到以下错误消息。Travis CI失败iOS Build

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 

通过日志阅读中,我可以看到,有一些错误的豆荚。因此,这里是我的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

看来你使用CocoaPods 1.2.1.beta.1推送的代码,但Travis-CI支持1.2.0。 gem install cocoapods安装CocoaPods的稳定版试试安装beta版