gpt4 book ai didi

react-native - 从 github 打开 react-native 项目时构建失败

转载 作者:行者123 更新时间:2023-12-04 02:45:16 25 4
gpt4 key购买 nike

我已经从 github 下载了 react-native 项目。链接是here

我安装了 npm。到目前为止一切都很好。当我运行 react-native run-ios 时出现以下错误

User defaults from command line: IDEDerivedDataPathOverride = /Users/sriram/Desktop/FirebaseAuth-master/ios/build/Auth

note: Using new build system note: Planning build note: Constructing build description Build system information error: /Users/sriram/Desktop/FirebaseAuth-master/ios/Pods/Target Support Files/Pods-Auth/Pods-Auth.debug.xcconfig: unable to open file (in target "Auth" in project "Auth") (in target 'Auth')

Build system information error: /Users/sriram/Desktop/FirebaseAuth-master/ios/Pods/Target Support Files/Pods-Auth/Pods-Auth.debug.xcconfig: unable to open file (in target "Auth" in project "Auth") (in target 'Auth')

Build system information error: /Users/sriram/Desktop/FirebaseAuth-master/ios/Pods/Target Support Files/Pods-Auth/Pods-Auth.debug.xcconfig: unable to open file (in target "Auth" in project "Auth") (in target 'Auth')

Build system information error: /Users/sriram/Desktop/FirebaseAuth-master/ios/Pods/Target Support Files/Pods-Auth/Pods-Auth.debug.xcconfig: unable to open file (in target "Auth" in project "Auth") (in target 'Auth')

Build system information error: /Users/sriram/Desktop/FirebaseAuth-master/ios/Pods/Target Support Files/Pods-AuthTests/Pods-AuthTests.debug.xcconfig: unable to open file (in target "AuthTests" in project "Auth") (in target 'AuthTests')

Build system information error: /Users/sriram/Desktop/FirebaseAuth-master/ios/Pods/Target Support Files/Pods-AuthTests/Pods-AuthTests.debug.xcconfig: unable to open file (in target "AuthTests" in project "Auth") (in target 'AuthTests')

Build system information error: /Users/sriram/Desktop/FirebaseAuth-master/ios/Pods/Target Support Files/Pods-AuthTests/Pods-AuthTests.debug.xcconfig: unable to open file (in target "AuthTests" in project "Auth") (in target 'AuthTests')

Build system information error: /Users/sriram/Desktop/FirebaseAuth-master/ios/Pods/Target Support Files/Pods-AuthTests/Pods-AuthTests.debug.xcconfig: unable to open file (in target "AuthTests" in project "Auth") (in target 'AuthTests')

** BUILD FAILED **

后来我尝试了cd ios && pod install之后我尝试了 react-native run-ios,我收到以下错误:以下构建命令失败: 编译C/Users/sriram/Desktop/Auth/ios/build/Auth/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DoubleConversion.build/Objects-normal/x86_64/DoubleConversion-dummy.o Target\Support\Files/DoubleConversion/DoubleConversion-dummy.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler(1 次失败)

这是我的 PodFile:

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'Auth' do
# Pods for Auth
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

target 'AuthTests' do
inherit! :search_paths
# Pods for testing
end

use_native_modules!
end

target 'Auth-tvOS' do
# Pods for Auth-tvOS

target 'Auth-tvOSTests' do
inherit! :search_paths
# Pods for testing
end

end

最佳答案

请按照以下步骤操作:

  1. 打开 Auth.xcworkspace
  2. 在左侧,您会找到 Pods 文件夹。删除它。 enter image description here

  3. 现在在终端中,进入您的项目目录,cd 进入 ios 并执行 rm -rf Pods Podfile.lock

  4. 执行 pod 安装

关于react-native - 从 github 打开 react-native 项目时构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57429588/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com