ios - React Native iOS 构建在本地成功,但在 CI 服务器上失败
问题描述
AsyncStorage
我最近将一个 React Native 项目更新到了 0.59 版本,现在不推荐使用内置的。所以我@react-native-community/react-native-async-storage
按照建议安装了包,并通过运行链接包react-native link @react-native-community/async-storage
。
现在在本地 Xcode 中运行构建成功。但是,当我尝试在 Azure DevOps 的 CI 管道中运行构建时,它在链接过程中失败:
# ...
▸ Compiling main.m
▸ Linking MyApp
⚠️ ld: directory not found for option '-L/Users/vsts/agent/2.149.2/work/1/s/ios/MyApp/System/Library/Frameworks'
❌ ld: library not found for -lRNCAsyncStorage
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
▸ Linking MyApp
⚠️ ld: directory not found for option '-L/Users/vsts/agent/2.149.2/work/1/s/ios/MyApp/System/Library/Frameworks'
❌ ld: library not found for -lRNCAsyncStorage
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/vsts/Library/Developer/Xcode/DerivedData/MyApp-asjjausbybqgpsdjodrbvoyzaeqx/Build/Intermediates.noindex/MyApp.build/BetaRelease-iphoneos/MyApp.build/Objects-normal/armv7/MyApp normal armv7
Ld /Users/vsts/Library/Developer/Xcode/DerivedData/MyApp-asjjausbybqgpsdjodrbvoyzaeqx/Build/Intermediates.noindex/MyApp.build/BetaRelease-iphoneos/MyApp.build/Objects-normal/arm64/MyApp normal arm64
(2 failures)
##[error]Error: /usr/bin/xcodebuild failed with return code: 65
##[section]Finishing: Xcode build, sign and export
再往上看,它确实看起来已经建成:
# ...
▸ Building RNCAsyncStorage/RNCAsyncStorage [(Release)]
▸ Check Dependencies
▸ Building library libRNCAsyncStorage.a
▸ Building library libRNCAsyncStorage.a
▸ Copying RNCAsyncStorage.h
▸ Copying RNCAsyncStorageDelegate.h
# ...
有什么想法可能导致这种情况吗?
解决方案
推荐阅读
- sql - 在sql server中将多行转换为包含数据的列
- java - Hibernate JPA 2 Metamodel Generator土耳其字符问题
- android - 片段中的 TabLayout 显示空白的白条
- firebase - 是否支持负载均衡?
- javascript - 有没有办法从单击更改为悬停在我的缩略图库上?
- python - 如何解析 XML 文件中的 VCARD
- user-interface - 可访问的对比度与企业标识指南
- c# - 订阅正在执行的任何方法
- angular - 我无法理解 ngFor 循环中索引值的作用以及它如何帮助创建动态表单字段
- python - 创建评分从 django 开始