安装React本机项目依赖项并执行react-native link
后,当我运行命令react-native run-ios
时会出现此错误。
Build system information
error: Multiple commands produce ...
1) Target 'ReactNativeNavigation' (project 'ReactNativeNavigation') has copy command from '.../node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.h' to '.../ios/build/Build/Products/Debug-iphonesimulator/include/ReactNativeNavigation/ReactNativeNavigation.h'
2) Target 'ReactNativeNavigation' (project 'ReactNativeNavigation') has copy command from '.../node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.h' to '.../ios/build/Build/Products/Debug-iphonesimulator/include/ReactNativeNavigation/ReactNativeNavigation.h'
** BUILD FAILED **
Installing build/Build/Products/Debug-iphonesimulator/myapp.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/myapp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
提供更多信息:
react-native-cli: 2.0.1
react-native: 0.56.0
xcode 10.0
node v10.11.0
npm 6.4.1
谢谢
答案 0 :(得分:1)
这是ngOnInit(): void {
this.store.dispatch(new basketActions.Load());
this.basket$ = this.store.pipe(
select(fromBasket.getBasket)
);
this.nettoTotal$ = this.basket$.pipe(
map(basket => basket.lines),
map(lines => lines.map(line => line.price * line.unitsOrdered)),
reduce(
(accumulator, linePrice) => accumulator + linePrice,
0
)
);
}
的错误,已在this commit中修复
一个临时解决方法是转到项目租凭单中的react-native-navigation
(应在库中),然后在 TARGETS (而不是 PROJECT)下选择ReactNativeNavigation.xcodeproj
),然后选择“构建阶段”>“复制文件”,然后选中ReactNativeNavigation
。