1.Command `run-ios` unrecognized. Make sure that you have run
解决:
先执行:
npm install --save react-native@latest
再使用yarn react-native run-ios
2.404问题
1.build.gradle中的depends将react-native+改成具体版本,跟package.json中react-native版本一致
2.查看8081是否被占用,如果占用科技修改端口。修改完记得npm start看控制台中端口是否更改
3.error: Build input file cannot be found: '/Users/pangzaifei/Documents/reactnative/GithubRn/node_modules/react-native/Libraries/WebSocket/libfishhook.a'
用xcode打开,将libfishhook.a先移除,再加回去就可以了
4.
createSwitchNavigator的options应该再第二个参数配置。
export default createSwitchNavigator({
Init: InitNavigator,
Main: MainNavigator,
}, {
navigationOptions: {
header: null,
}
})