0

我使用命令react-native init LocationExample --version 0.57.7创建了一个新项目

它创建了一个名为LocationExample的项目,但是当我进一步进入项目文件夹并运行命令react-native run-ios 时

这给出了一个错误说明 条目,“:CFBundleIdentifier”,不存在

我尝试通过运行命令rm -rf ios/build删除构建文件夹,还尝试通过rm -rf node_modules删除模式模块。之后我运行yarn命令再次安装 node_modules ,但这没有效果。

编辑1:

/Users/apple/React Native/LocationExample/node_modules/react-native/scripts/ios-install-third-party.sh: line 56: /Users/apple/React/ios-configure-glog.sh: No such file or directory
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure

还有这个错误

'glog/logging.h' file not found

预期:应安装应用程序并成功运行。

实际:未安装应用程序并指出 BundleIdentifier 的错误。

4

1 回答 1

0

将其构建在Xcode. 如果构建成功,则在Xcode使用中运行它Cmd+R

编辑

尝试这个

1-更改捆绑标识符。

2-添加包:

yarn add @babel/runtime

3-

watchman watch-del-all

4-删除构建:

rm -rf ios/build

5-

sed -i '' '/DevelopmentTeam = V9WTTPBFK9/d;/DEVELOPMENT_TEAM/d;/ProvisioningStyle = Automatic/d' ./node_modules/react-native/React/React.xcodeproj/project.pbxproj

6-

react-native start --reset-cache

7-

react-native run-ios

于 2019-04-10T10:50:37.910 回答