React Native Project 没有在使用 Apple M1 芯片的 iOS 模拟器上运行

Posted

技术标签:

【中文标题】React Native Project 没有在使用 Apple M1 芯片的 iOS 模拟器上运行【英文标题】:React Native Project is not running on iOS Simulator using Apple M1 chip 【发布时间】:2021-07-24 13:33:28 【问题描述】:

我对 React Native 并不陌生,已经研究了一段时间,但我现在面临的问题是非常新的。我受够了这个问题。我面临的问题是,我无法在 iOS 模拟器上运行应用程序。我已经尝试了几乎所有方法来解决这个问题,但都无法解决。

我的试验:

    删除PodsPodfile.lock 然后执行pod installreact-native run-ios 删除了node_modulespackage-lock.json,然后是PodsPodfile.lock,然后是npm install -> pod install -> react-native run-ios 打开 Xcode,清理 Build,然后react-native run-ios 运行react-native start --reset-cache 然后react-native run-ios 执行pod update 然后react-native run-ios

它仍然失败,它在控制台上引发了很多错误。我对这种情况感到困惑和恐惧。直到早上一切正常,但现在没有任何工作

我得到的错误:

I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsi -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsiexecutor -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsinspector -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-perflogger -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-runtimeexecutor -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/ReactCommon -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/Yoga -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/glog -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/boost-for-react-native -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/RCT-Folly -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/DoubleConversion -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Private/React-Core -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources-normal/x86_64 -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources/x86_64 -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources -F/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Products/Debug-iphonesimulator/ReactCommon -fmodule-map-file\=/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React/React-Core.modulemap -fmodule-map-file\=/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/yoga/Yoga.modulemap -DFOLLY_NO_CONFIG -DFOLLY_MOBILE\=1 -DFOLLY_USE_LIBCPP\=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -include /Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Target\ Support\ Files/ReactCommon/ReactCommon-prefix.pch -MMD -MT dependencies -MF /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModuleUtils.d --serialize-diagnostics /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModuleUtils.dia -c /Users/careerlabsdev/Documents/Projects/SpaceX/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.cpp -o /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModuleUtils.o

Libtool /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Products/Debug-iphonesimulator/YogaKit/libYogaKit.a normal (in target 'YogaKit' from project 'Pods')
    cd /Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods
    export IPHONEOS_DEPLOYMENT_TARGET\=10.0
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -D -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -L/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Products/Debug-iphonesimulator/YogaKit -filelist /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/YogaKit.build/Objects-normal/x86_64/YogaKit.LinkFileList -dependency_info /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/YogaKit.build/Objects-normal/x86_64/YogaKit_libtool_dependency_info.dat -o /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Products/Debug-iphonesimulator/YogaKit/libYogaKit.a

CompileC /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModulePerfLogger.o /Users/careerlabsdev/Documents/Projects/SpaceX/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'ReactCommon' from project 'Pods')
    cd /Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods
    export LANG\=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target x86_64-apple-ios10.0-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=c++14 -stdlib\=libc++ -fmodules -fmodules-cache-path\=/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Werror\=deprecated-objc-isa-usage -Werror\=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DPOD_CONFIGURATION_DEBUG\=1 -DDEBUG\=1 -DCOCOAPODS\=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Index/DataStore -iquote /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-generated-files.hmap -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-own-target-headers.hmap -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-all-non-framework-target-headers.hmap -ivfsoverlay /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/all-product-headers.yaml -iquote /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-project-headers.hmap -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Products/Debug-iphonesimulator/ReactCommon/include -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Private -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Private/ReactCommon -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/DoubleConversion -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/RCT-Folly -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-Core -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-callinvoker -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-cxxreact -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsi -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsiexecutor -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsinspector -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-perflogger -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-runtimeexecutor -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/ReactCommon -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/Yoga -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/glog -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/boost-for-react-native -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/RCT-Folly -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/DoubleConversion -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Private/React-Core -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources-normal/x86_64 -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources/x86_64 -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources -F/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Products/Debug-iphonesimulator/ReactCommon -fmodule-map-file\=/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React/React-Core.modulemap -fmodule-map-file\=/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/yoga/Yoga.modulemap -DFOLLY_NO_CONFIG -DFOLLY_MOBILE\=1 -DFOLLY_USE_LIBCPP\=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -include /Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Target\ Support\ Files/ReactCommon/ReactCommon-prefix.pch -MMD -MT dependencies -MF /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModulePerfLogger.d --serialize-diagnostics /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModulePerfLogger.dia -c /Users/careerlabsdev/Documents/Projects/SpaceX/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.cpp -o /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModulePerfLogger.o

CompileC /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModuleBinding.o /Users/careerlabsdev/Documents/Projects/SpaceX/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'ReactCommon' from project 'Pods')
    cd /Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods
    export LANG\=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target x86_64-apple-ios10.0-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=c++14 -stdlib\=libc++ -fmodules -fmodules-cache-path\=/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Werror\=deprecated-objc-isa-usage -Werror\=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DPOD_CONFIGURATION_DEBUG\=1 -DDEBUG\=1 -DCOCOAPODS\=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Index/DataStore -iquote /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-generated-files.hmap -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-own-target-headers.hmap -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-all-non-framework-target-headers.hmap -ivfsoverlay /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/all-product-headers.yaml -iquote /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-project-headers.hmap -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Products/Debug-iphonesimulator/ReactCommon/include -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Private -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Private/ReactCommon -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/DoubleConversion -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/RCT-Folly -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-Core -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-callinvoker -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-cxxreact -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsi -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsiexecutor -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsinspector -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-perflogger -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-runtimeexecutor -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/ReactCommon -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/Yoga -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/glog -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/boost-for-react-native -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/RCT-Folly -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/DoubleConversion -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Private/React-Core -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources-normal/x86_64 -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources/x86_64 -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources -F/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Products/Debug-iphonesimulator/ReactCommon -fmodule-map-file\=/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React/React-Core.modulemap -fmodule-map-file\=/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/yoga/Yoga.modulemap -DFOLLY_NO_CONFIG -DFOLLY_MOBILE\=1 -DFOLLY_USE_LIBCPP\=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -include /Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Target\ Support\ Files/ReactCommon/ReactCommon-prefix.pch -MMD -MT dependencies -MF /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModuleBinding.d --serialize-diagnostics /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModuleBinding.dia -c /Users/careerlabsdev/Documents/Projects/SpaceX/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp -o /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModuleBinding.o

CompileC /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModule.o /Users/careerlabsdev/Documents/Projects/SpaceX/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'ReactCommon' from project 'Pods')
    cd /Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods
    export LANG\=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target x86_64-apple-ios10.0-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=c++14 -stdlib\=libc++ -fmodules -fmodules-cache-path\=/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Werror\=deprecated-objc-isa-usage -Werror\=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DPOD_CONFIGURATION_DEBUG\=1 -DDEBUG\=1 -DCOCOAPODS\=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Index/DataStore -iquote /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-generated-files.hmap -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-own-target-headers.hmap -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-all-non-framework-target-headers.hmap -ivfsoverlay /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/all-product-headers.yaml -iquote /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/ReactCommon-project-headers.hmap -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Products/Debug-iphonesimulator/ReactCommon/include -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Private -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Private/ReactCommon -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/DoubleConversion -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/RCT-Folly -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-Core -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-callinvoker -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-cxxreact -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsi -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsiexecutor -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-jsinspector -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-perflogger -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React-runtimeexecutor -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/ReactCommon -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/Yoga -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/glog -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/boost-for-react-native -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/RCT-Folly -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/DoubleConversion -I/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Private/React-Core -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources-normal/x86_64 -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources/x86_64 -I/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/DerivedSources -F/Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Products/Debug-iphonesimulator/ReactCommon -fmodule-map-file\=/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/React/React-Core.modulemap -fmodule-map-file\=/Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Headers/Public/yoga/Yoga.modulemap -DFOLLY_NO_CONFIG -DFOLLY_MOBILE\=1 -DFOLLY_USE_LIBCPP\=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -include /Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Target\ Support\ Files/ReactCommon/ReactCommon-prefix.pch -MMD -MT dependencies -MF /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModule.d --serialize-diagnostics /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModule.dia -c /Users/careerlabsdev/Documents/Projects/SpaceX/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.cpp -o /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/TurboModule.o

warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the SpaceX editor. (in target 'SpaceX' from project 'SpaceX')

** BUILD FAILED **


The following build commands failed:
        CompileC /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

错误的最后一行感觉像问题:

** BUILD FAILED **


The following build commands failed:
        CompileC /Users/careerlabsdev/Library/Developer/Xcode/DerivedData/SpaceX-gxgruwmfuircbegvjpqyszccmuiz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /Users/careerlabsdev/Documents/Projects/SpaceX/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

播客文件

  use_flipper!('Flipper' => '0.81.0')

  post_install do |installer|
    flipper_post_install(installer)
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
      end
    end
  end

我使用 Apple M1 芯片 Macbook Air。

【问题讨论】:

试试这个解决方案。希望这会有所帮助:***.com/a/67340473/8013132 【参考方案1】:

解决方案是通过进入ios/Podfile 完全禁用Flipper,然后像下面这样评论use_flipper!()

  # Enables Flipper.
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  # use_flipper!()

如果你在这个方法中使用flipper_native_post_install(installer)

  post_install do |installer|
    # do not use this, if you have commented #use_flipper!()
    # flipper_post_install(installer)
    # use react native installer
    react_native_post_install(installer)
  end

然后这样做:

cd ios && pod install && cd .. && npm run ios

一切都会开始正常进行。我不知道为什么它只是给 Flipper 带来问题。以前没有发生在我身上,直到今天下午,一切都爆发了。执行上述操作,您就完成了排序。谢谢。

【讨论】:

【参考方案2】:

如果很紧急,不需要在 Flipper 上进行测试,请尝试在 iOS 端删除所有对 Flipper 的引用。

它会在AppDelegate.m评论这部分

//#import <FlipperKit/FlipperClient.h>
//#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
//#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
//#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
//#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
//#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>


//static void InitializeFlipper(UIApplication *application) 
//  FlipperClient *client = [FlipperClient sharedClient];
//  SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
//  [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
//  [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
//  [client addPlugin:[FlipperKitReactPlugin new]];
//  [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
//  [client start];
//

您可以尝试的另一件事是清理您的构建,关闭 Xcode 并删除 Developer 文件夹中的 DerivedData 文件夹。然后你打开 Xcode 并尝试再次构建。

【讨论】:

以上是关于React Native Project 没有在使用 Apple M1 芯片的 iOS 模拟器上运行的主要内容,如果未能解决你的问题,请参考以下文章

text 清除React Native Project的缓存

react-native 使用react-native run-android 启动项目 报错 Android project not found

解决 React-Native: Android project not found. Maybe run react-native android first?

React Native只需重新初始化iOS或Android Project

“react-native init project”命令不起作用

npm install -g react-native-cli 与使用 npx react-native init <project name> 有啥区别?