React Native在M2 Max上运行时出现错误。

huangapple go评论66阅读模式
英文:

React Native run on M2 Max - errors

问题

我每个项目都有错误。没有什么能帮助解决这个问题。问题仅出现在运行 iOS 时。
我有 M2 Max 处理器。

我修复的第一个错误是添加 |

CompileC /Users/samwieszkto/Library/Developer/Xcode/DerivedData/Grywitacja-gfnnprhjczzsuaatjeokqvqqcrcl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Yoga.build/Objects-normal/arm64/Yoga.o /Users/samwieszkto/Desktop/Grywit/grywitacja-app/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'Yoga' from project 'Pods')
(1 failure)

接下来(在Visual Studio Code中):

CompileC /Users/samwieszkto/Library/Developer/Xcode/DerivedData/Grywitacja-gfnnprhjczzsuaatjeokqvqqcrcl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/json.o /Users/samwieszkto/Desktop/Grywit/grywitacja-app/ios/Pods/RCT-Folly/folly/json.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
(1 failure)

在Xcode中:在名称空间 'std' 中没有名为 'unary_function' 的模板;您是否是指 '__unary_function'?
当我更改它时,我收到:

以下构建命令失败:
        Ld /Users/samwieszkto/Library/Developer/Xcode/DerivedData/Grywitacja-gfnnprhjczzsuaatjeokqvqqcrcl/Build/Products/Debug-iphonesimulator/Grywitacja.app/Grywitacja normal (in target 'Grywitacja' from project 'Grywitacja')
(1 failure)

在Xcode中:
Xcode中的错误

我可以做些什么来最终能够在iOS上工作?在这些新处理器上,运行Android比iOS更容易。谢谢!

英文:

I have a errors on every one a project. Nothing help with this. Problem only with run ios.
I have M2 Max processor.

First error which I repair adding |:

CompileC /Users/samwieszkto/Library/Developer/Xcode/DerivedData/Grywitacja-gfnnprhjczzsuaatjeokqvqqcrcl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Yoga.build/Objects-normal/arm64/Yoga.o /Users/samwieszkto/Desktop/Grywit/grywitacja-app/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'Yoga' from project 'Pods')
(1 failure)

next (in Visual Studio Code):

CompileC /Users/samwieszkto/Library/Developer/Xcode/DerivedData/Grywitacja-gfnnprhjczzsuaatjeokqvqqcrcl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/json.o /Users/samwieszkto/Desktop/Grywit/grywitacja-app/ios/Pods/RCT-Folly/folly/json.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
(1 failure)

In xCode: No template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
When I change it I received:

The following build commands failed:
        Ld /Users/samwieszkto/Library/Developer/Xcode/DerivedData/Grywitacja-gfnnprhjczzsuaatjeokqvqqcrcl/Build/Products/Debug-iphonesimulator/Grywitacja.app/Grywitacja normal (in target 'Grywitacja' from project 'Grywitacja')
(1 failure)

in xcode:
errors in xcode

What can I do to finally be able to work on iOS? Easier to run Android than iOS on these new processors. Thanks

答案1

得分: 0

Now everything works
error:

CompileC /Users/samwieszkto/Library/Developer/Xcode/DerivedData/Grywitacja-gfnnprhjczzsuaatjeokqvqqcrcl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Yoga.build/Objects-normal/arm64/Yoga.o /Users/samwieszkto/Desktop/Grywit/grywitacja-app/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'Yoga' from project 'Pods')
(1 failure)

node->getLayout().hadOverflow() | changed to node->getLayout().hadOverflow() ||

error: No template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
repair:

#if defined(BOOST_NO_CXX98_FUNCTION_BASE)
changed to
#if defined(BOOST_NO_CXX98_FUNCTION_BASE) || (BOOST_CXX_VERSION >= 201703)

a lot of errors of swift I repair by add arm64 i386 to Project->Target: Project-> Excluded Architectures and in the same place in Build Phases-> Link Binary... add libswiftWebKit.tbd. And to Pods->Pods arm64 i386 in Excluded Architectures(when doesn't work run in Visual Studio Code like in my project, error was
CompileC /Users/samwieszkto/Library/Developer/Xcode/DerivedData/Grywitacja-gfnnprhjczzsuaatjeokqvqqcrcl/Build/Intermediates.noindex/Grywitacja.build/Debug-iphonesimulator/Grywitacja.build/Objects-normal/x86_64/Grywitacja_vers.o /Users/samwieszkto/Library/Developer/Xcode/DerivedData/Grywitacja-gfnnprhjczzsuaatjeokqvqqcrcl/Build/Intermediates.noindex/Grywitacja.build/Debug-iphonesimulator/Grywitacja.build/DerivedSources/Grywitacja_vers.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'Grywitacja' from project 'Grywitacja') ). Thanks for try help me!

英文:

Now everything works
error:

CompileC /Users/samwieszkto/Library/Developer/Xcode/DerivedData/Grywitacja-gfnnprhjczzsuaatjeokqvqqcrcl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Yoga.build/Objects-normal/arm64/Yoga.o /Users/samwieszkto/Desktop/Grywit/grywitacja-app/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'Yoga' from project 'Pods')
(1 failure)

node->getLayout().hadOverflow() | changed to node->getLayout().hadOverflow() ||

error: No template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
repair:

#if defined(BOOST_NO_CXX98_FUNCTION_BASE) 
changed to
#if defined(BOOST_NO_CXX98_FUNCTION_BASE) || (BOOST_CXX_VERSION >= 201703)

a lot of errors of swift I repair by add arm64 i386 to Project->Target: Project-> Excluded Architectures and in the same place in Build Phases-> Link Binary... add libswiftWebKit.tbd. And to Pods->Pods arm64 i386 in Excluded Architectures(when doesn't work run in Visual Studio Code like in my project, error was
CompileC /Users/samwieszkto/Library/Developer/Xcode/DerivedData/Grywitacja-gfnnprhjczzsuaatjeokqvqqcrcl/Build/Intermediates.noindex/Grywitacja.build/Debug-iphonesimulator/Grywitacja.build/Objects-normal/x86_64/Grywitacja_vers.o /Users/samwieszkto/Library/Developer/Xcode/DerivedData/Grywitacja-gfnnprhjczzsuaatjeokqvqqcrcl/Build/Intermediates.noindex/Grywitacja.build/Debug-iphonesimulator/Grywitacja.build/DerivedSources/Grywitacja_vers.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler (in target 'Grywitacja' from project 'Grywitacja')
).
Thanks for try help me!

huangapple
  • 本文由 发表于 2023年6月15日 01:53:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/76476326.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定