本文介绍了Travis-CI无法打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建我的iOS项目,但是travis-ci正在打印以下错误消息:

I'm trying to build my iOS project, but travis-ci is printing following error message:

当然,我选择了共享方案。我可以在本地构建项目。我不明白为什么travis找不到 debug.xcconfig 文件。

Of course I selected my scheme as shared. It's possible for me to build the project locally. I don't understand why travis is not finding the debug.xcconfig file.

My Podfile:

  platform :ios, '10.0'

target 'Analyzer' do
  use_frameworks!

  pod 'Charts'

end

我的travis.yml:

My travis.yml:

language: objective-c
osx_image: xcode10
xcode_workspace: Analyzer.xcworkspace
xcode_scheme: Analyzer
xcode_destination: platform=iOS Simulator,OS=12.0,name=iPad Pro (9.7-inch)
podfile: Podfile
before_install:
  - gem install cocoapods
  - pod install --repo-update

调试后,我使用ssh检查

After debugging I used ssh to check the file permission.

-rw-r--r--  1 travis  staff    662 Nov  3 14:41 Pods-Analyzer.debug.xcconfig

如您所见,顶部打开文件应该是完全可以的。

As you see this should be totally fine to top open the file.

推荐答案

与Travis无关。这是来自的奇怪错误。将 gem install cocoapods --pr 添加到您的 travis.yml 应该可以解决此问题。

It has nothing to do with Travis. It's a weird bug from cocoapods. Adding gem install cocoapods --pr to your travis.yml should fix it.

我当前的travis.yml:

My current travis.yml:

language: swift
osx_image: xcode10.1
xcode_workspace: Analyzer.xcworkspace
xcode_scheme: Analyzer
xcode_destination: platform=iOS Simulator,OS=12.1,name=iPad Pro (9.7-inch)
podfile: Podfile
before_install:
  - gem install cocoapods --pre
  - pod install --repo-update

这篇关于Travis-CI无法打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 02:50