简体   繁体   English

错误无法为 ios 项目安装 CocoaPods 依赖项。 反应原生

[英]Error Failed to install CocoaPods dependencies for ios project. React Native

I have a macbook pro m1 and I am getting the above error when trying npx react-native init.我有一个 macbook pro m1,在尝试 npx react-native init 时出现上述错误。 I have followed the react native documentation for environment set up.我已按照环境设置的本机文档进行操作。 I tried to install pod via brew, however, still the same error.我尝试通过 brew 安装 pod,但是,仍然是同样的错误。 What is the issue?问题是什么? I see a lot of people having the same issue, but there is no clear explanation or solution for it?我看到很多人有同样的问题,但没有明确的解释或解决方案? Please help请帮忙

✔ Processing template ✖ Installing CocoaPods dependencies (this may take a few minutes) ✖ Installing CocoaPods dependencies (this may take a few minutes) error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template. ✔ Processing template ✖ Installing CocoaPods dependencies (this may take a few minutes) ✖ Installing CocoaPods dependencies (this may take a few minutes) error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template. Please try again manually: "cd./test/ios && pod install".请手动重试:“cd./test/ios && pod install”。 CocoaPods documentation: https://cocoapods.org/ CocoaPods 文档: https://cocoapods.org/

[NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. [注意] 您可能在 Ruby 解释器或扩展库中遇到了错误。 Bug reports are welcome.欢迎提交错误报告。 For details: https://www.ruby-lang.org/bugreport.html详情: https://www.ruby-lang.org/bugreport.html

[IMPORTANT] Don't forget to include the Crash Report log file under DiagnosticReports directory in bug reports. [重要] 不要忘记在错误报告中包含 DiagnosticReports 目录下的崩溃报告日志文件。

when I tried to run ios:当我尝试运行 ios 时:

BUILD FAILED **构建失败**

The following build commands failed: CompileC /Users/patrickbelan/Library/Developer/Xcode/DerivedData/test-gqoaknolitrwejedppjzybscmama/Build/Intermediates.noindex/test.build/Debug-iphonesimulator/test.build/Objects-normal/arm64/main.o /Users/patrickbelan/Desktop/react/test/ios/test/main.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'test' from project 'test') CompileC /Users/patrickbelan/Library/Developer/Xcode/DerivedData/test-gqoaknolitrwejedppjzybscmama/Build/Intermediates.noindex/test.build/Debug-iphonesimulator/test.build/Objects-normal/arm64/AppDelegate.o /Users/patrickbelan/Desktop/react/test/ios/test/AppDelegate.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'test' from project 'test') (2 failures)以下构建命令失败:CompileC /Users/patrickbelan/Library/Developer/Xcode/DerivedData/test-gqoaknolitrwejedppjzybscmama/Build/Intermediates.noindex/test.build/Debug-iphonesimulator/test.build/Objects-normal/arm64/main。 o /Users/patrickbelan/Desktop/react/test/ios/test/main.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'test' from project 'test') CompileC /Users /patrickbelan/Library/Developer/Xcode/DerivedData/test-gqoaknolitrwejedppjzybscmama/Build/Intermediates.noindex/test.build/Debug-iphonesimulator/test.build/Objects-normal/arm64/AppDelegate.o /Users/patrickbelan/Desktop/react /test/ios/test/AppDelegate.m 正常 arm64 objective-c com.apple.compilers.llvm.Z2C5517DB7BC397F9B14AE357A7CE52 故障FFZ.1_0.test' (来自目标编译器)

Ok, I managed to solve it.好的,我设法解决了。 Thus, for everyone encountering the same issue, please refer to the following link.因此,对于遇到相同问题的每个人,请参考以下链接。 December 2021, and it is still solving the issue [Running CocoaPods on Apple Silicon (M1) 1 2021 年 12 月,它仍在解决问题 [在 Apple Silicon (M1) 1上运行 CocoaPods

enter image description here在此处输入图像描述

how about trying to further ensure with Xcode that there is a valid command-line tool chosen.如何尝试使用 Xcode 进一步确保选择了有效的命令行工具。 , go to Xcode Preferences » Location and selected Xcode version from the Command Line Tools select list if its blank. , go to Xcode Preferences » Location and selected Xcode version from the Command Line Tools select list if its blank.

And then run cd./yourAppName/ios && pod install inside that app folder然后在该应用程序文件夹中运行 cd./yourAppName/ios && pod install

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法为 iOS 项目 React-Native 安装 CocoaPods 依赖项 - Failed to install CocoaPods dependencies for iOS project React-Native React-Native:错误:无法为iOS项目安装CocoaPods依赖项,这是该模板所需要的 - React-Native: Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template React-native Error: Failed to install CocoaPods dependencies for iOS project, 这是这个模板所需要的 - React-native Error : Failed to install CocoaPods dependencies for iOS project, which is required by this template 错误:无法安装此模板所需的 iOS 项目的 CocoaPods 依赖项 - Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template 实施 React-native-firebase 错误无法构建 iOS 项目。 我们运行了“xcodebuild”命令,但它以错误代码 65 退出 - Implementing React-native-firebase error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65 React Native 无法构建 iOS 项目。 我们运行了“xcodebuild”命令,但它以错误代码 65 退出。问题出在所有项目上 - React Native Failed to build iOS project. We ran “xcodebuild” command but it exited with error code 65. The problem is with all projects 显示使用Cocoapods的Xcode项目的所有本机iOS依赖关系/框架 - Show All Native iOS Dependencies/Frameworks for an Xcode Project That Uses Cocoapods 初始化 react-native 项目时无法安装 cocoapods - failure to install cocoapods when initializing a react-native project “npx cap add ios”失败并出现错误“使用 pod install 更新 iOS 本机依赖项 - 失败!” - " npx cap add ios" fails with error "Updating iOS native dependencies with pod install - failed!" 如何用cocoapods反应原生依赖性? - how to get react native dependencies with cocoapods?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM