执行react-native run-ios时出现错误。

问题描述 投票:0回答:1

嗨,我使用react-native创建了一个项目,当我运行命令时,我发现

react-native run-ios

在终端中构建失败,并出现以下错误。

**The following build commands failed:**

CompileC /var/root/Library/Developer/Xcode/DerivedData/albums-gnnqffkyfazehwcywcchxrdqkvpd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/Objects-normal/x86_64/RCTBaseTextInputView.o /ReactNative/albums/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
react-native build-error
1个回答
2
投票

试试这个。

cd ios
pod install
react-native run-ios 

你可以用XCode运行你的react native IOS应用,具体步骤如下。

1.进入App文件夹,然后进入ios文件夹。你会看到一个名为AwesomeProject.xcworkspace的文件。

2.打开这个文件,它将在Xcode中打开你的App。

3.选择所需的模拟器,然后点击▶️按钮来运行你的App。

© www.soinside.com 2019 - 2024. All rights reserved.