问题描述
我正在 MacBook Air m1 上制作 React 原生 iOS 应用程序。当我在 vscode 中运行 npx react-native run-ios
时,出现了很多错误:
当我尝试从 Xcode(来自“name.xcworkplace”)构建它时,我遇到了这些错误:
当我从 Xcode(来自“name.xcodeproj”)构建它时,它运行 Metro 服务器,但在 iOS 模拟器上构建失败。我收到这些错误:
这是我的 Podfile:
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
我花了一周的时间想办法弄清楚,但我几乎迷失了方向。 如果您有任何问题,请随时提问!! 非常感谢您的帮助。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)