更改项目名称后,react-native run-ios无法正常工作

时间:2017-09-17 19:53:09

标签: javascript ios reactjs debugging react-native

我决定更改我的React Native项目的名称,首先在主目录中更改它以命名它" AppName"通过摆脱其以前的名称。

我还将ios内的所有文件夹名称更改为AppName,并删除了之前的名称。

即使在index.ios.js内,我也摆脱了以前的名字。

但是,每当我运行react-native run-ios时,我都会收到以下错误:

Installing build/Build/Products/Debug-iphonesimulator/AppName.app
An error was encountered processing the command 
(domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier 
build/Build/Products/Debug-iphonesimulator/AppName.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

为什么我收到此错误?我知道这与更改项目名称有关。

1 个答案:

答案 0 :(得分:0)

要重命名react native项目,您应该使用react-native-rename 因为手动重命名会破坏你的项目