錯誤內(nèi)容:
Installing build/Build/Products/Debug-iphonesimulator/TestDemo.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/TestDemo.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
解決辦法:
修改package.json的react的版本:(如上圖)
react版本要和react-native版本搭配妙痹,上面版本只換一個也會出錯
step: 刪除node-modules文件夾铸史,修改pakage.json文件,然后執(zhí)行npm install
即可
第二種辦法:(上面的方法對部分用戶沒有效果)
用--version創(chuàng)建指定版本的項(xiàng)目怯伊,
react-native init Demoapp --version 0.44.3 版本號必須精確到兩個小數(shù)點(diǎn)