我花了整整一天的时间尝试使地图视图正常工作,并一路走来,发现了这个错误,我在互联网上找不到任何地方。错误代码在iOS模拟器上显示为红色,这是React native的典型现象。
我尝试重新安装开发工具,但没有成功。
这是我的package.json
{
"name":"P77",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "^16.7.0",
"react-native": "0.57.8",
"react-native-elements": "^0.19.1",
"react-native-maps": "^0.22.1",
"react-native-vector-icons": "^6.1.0",
"react-navigation": "git+https://github.com/react-community/react-navigation.git"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.51.1",
"react-devtools": "^3.4.3",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
请帮助
答案 0 :(得分:0)
我找到了一个对我有用的答案,但我不确定。也许这可以在将来对人们有所帮助。我跑了:
"yarn add eslint-config-rallycoding --dev"
"npm start"
(在项目目录中)