react Native 运行程序报错解决笔记

前端之家收集整理的这篇文章主要介绍了react Native 运行程序报错解决笔记前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  1. 命令行执行 react-native run-android

报如下错误

Exception in thread "main" java.net.UnknownHostException: services.gradle.org


解决方案:

修改hosts文件,增加如下

127.0.0.1 主机名 ps:127.0.0.1 Administrator


2.错误信息:

Failed to notify ProjectEvaluationListener.afterEvaluate(),but primary configur
ation failure takes precedence.
java.lang.RuntimeException: SDK location not found. Define location with sdk.dir
in the local.properties file or with an ANDROID_HOME environment variable.

解决提示SDK 没有找到,环境变量添加 ANDROID_HOME 值:SDK路径

原文链接:https://www.f2er.com/react/306898.html

猜你在找的React相关文章