ios - AppCenter 获取模块失败并显示错误 65
问题描述
我正在将 Swift 与 CocoaPods 一起使用,并尝试在 AppCenter 中构建它。
我一直收到这个失败的日志
CompileSwift normal arm64 (in target 'Wundercast' from project 'Wundercast')
cd /Users/runner/runners/2.165.2/work/1/s
/Applications/Xcode_11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-bc /Users/runner/runners/2.165.2/work/1/s/Wundercast/ViewController.swift /Users/runner/runners/2.165.2/work/1/s/Wundercast/Utils/Colors.swift /Users/runner/runners/2.165.2/work/1/s/Wundercast/AppDelegate.swift /Users/runner/runners/2.165.2/work/1/s/Wundercast/Controllers/ApiController.swift /Users/runner/runners/2.165.2/work/1/s/Wundercast/Utils/Appearance.swift -supplementary-output-file-map /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/supplementaryOutputs-8c8267 -target arm64-apple-ios10.1 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode_11.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -I /Users/runner/Library/Developer/Xcode/DerivedData/Wundercast-ermhkmlzqioflkgqqzuvbqmqczqy/Build/Intermediates.noindex/ArchiveIntermediates/Wundercast/BuildProductsPath/Release-iphoneos -F /Users/runner/Library/Developer/Xcode/DerivedData/W...
/Users/runner/runners/2.165.2/work/1/s/Wundercast/ViewController.swift:30:8: error: no such module 'RxSwift'
import RxSwift
^
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal armv7
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
CompileSwift normal arm64
(4 failures)
##[error]Error: /usr/bin/xcodebuild failed with return code: 65
根据之前的研究,我已经配置了项目xcworkspace
,并appcenter-post-clone.sh
安装了 CocoaPods。
我应该怎么做才能解决这个问题?
解决方案
在对一个空白项目进行了几次尝试之后,它在以下方面工作得很好appcenter-post-clone.sh
#!/usr/bin/env bash
echo "Uninstalling all CocoaPods versions"
sudo gem uninstall cocoapods --all --executables
COCOAPODS_VER=`sed -n -e 's/^COCOAPODS: \([0-9.]*\)/\1/p' Podfile.lock`
echo "Installing CocoaPods version $COCOAPODS_VER"
sudo gem install cocoapods -v $COCOAPODS_VER
cd $APPCENTER_SOURCE_DIRECTORY
pod install
但是,即使在本地,原始项目仍然在发布模式下失败。至少我现在知道这个问题与 AppCenter 无关,而是与 Xcode 有一些问题。通过将项目文件拖到一个新的 Xcode 项目中,它就像魅力一样工作。
推荐阅读
- javascript - 在每个对象中使用 Object.assign()
- java - 两个活动之间的共享元素转换不合适
- c# - 获取不同 XML 上的特定元素
- verilog - Verilog中非阻塞赋值的使用
- ios - 使用 Swift 泛型创建新的 NSManagedObjects
- python - 度数到 utm 转换,python
- amp-html - 路线图
- python - OpenAI Gradient Checkpointing with Tensorflow Eager Execution
- linux - 在 Linux 中检测从 PCIe 端点到主机内存的事务
- java - 将Java If语句映射到抽象语法树元模型(ASTM)类?