android - react-native run-android 安装时出错,无法在 Windows 10 中运行
问题描述
我目前正在运行 Windows 10。我遵循了https://facebook.github.io/react-native/docs/getting-started上有关 android 开发的文档中的所有步骤,但出现以下错误:
我尝试卸载和清理我的安装目录两次,但仍然有相同的错误。
我真的很想为 React Native 设置我的开发环境,但我不知道下一步该做什么。
我正在使用的版本(最新): react-native-cli: 2.0.1 react-native: 0.56.0
任何帮助将不胜感激。谢谢!
编辑 - 这是输出react-native start
解决方案
我认为这是 0.56 版中的一个错误。“解决方案”是找到依赖项版本的正确组合。正确地一一尝试此命令...
react-native init AwesomeProject
cd AwesomeProject
react-native run-android
npm uninstall react-native
npm install --save react-native@0.55.4
react-native run-android
npm install --save babel-core@latest babel-loader@latest
npm uninstall --save babel-preset-react-native
npm install --save babel-preset-react-native@4.0.0
react-native run-android
推荐阅读
- java - Spring Boot 2.x - 自动将 HTTP 重定向到 HTTPS
- java - 如何解决错误:“我在封闭范围中定义的局部变量必须是最终的或有效的最终”?
- python - 在python的单个文件中存储相当少量图像的有效方法?
- html - 如何将文本重新对齐页面底部的边框?
- r - 如何为新日期列设置开始日期,并将其链接到时间以更改为下一天
- csv - 我正在尝试使用 JMeter 向我的服务器发送 1000 多个 http 请求
- java - 多核机器是否有助于使用多线程进行快速处理?
- tensorflow - 新版keras导致形状不匹配
- python - 正确打印十六进制游戏板内容
- flutter - 未处理的异常:键入“列表”
'不是类型转换颤振http post请求中'String'类型的子类型