2017-03-11 130 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版