我正在MacBook Air m1上制作React本地的m1应用程序。当我在vscode中运行npx react-native run-ios时,我得到了很多错误:

当我试图从Xcode (从'name.xcworkplace')构建它时,我得到了以下错误:

当我从Xcode (从'name.xcodeproj')构建它时,它运行地铁服务器,但是在iOS模拟器上构建失败。我发现了这些错误:

这是我的个人档案:
require_relative '../node_modules/react-native/scripts/react_native_pods
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.0'
target 'authier' do
config = use_native_modules!
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
target 'authierTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
#use_flipper!()
#post_install do |installer|
# react_native_post_install(installer)
#end
end我试着想出一个星期的办法,结果我几乎迷路了。如果你有任何问题,请随便问!!非常感谢你的帮助。
发布于 2021-07-25 05:27:33
问题出在Xcode版本中。我用的是第13版的测试版。在我重新安装了Xcode并下载了稳定的12.5版本之后,它就可以工作了。
https://stackoverflow.com/questions/68490662
复制相似问题