* What went wrong: A problem occurred configuring project ‘:app’. > SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project’s local properties file at ‘F:\Example\demos\android\local.properties’.

原因:git下来的项目找不到本地SDK

解决方案:配置本地SDK路径

1.Android-studio 查询本地SDK路径

Android Studio设置或修改Android SDK路径

打开Android studio,点击“File”菜单下的“Other Settings”,接着点击“Default Project Structure”选项。

Github下载React-native 项目,运行SDK报错
这时就会看到SDK Location,点击图示第二个红色区域的图标,就可以修改默认的AndroidSDK路径。
Github下载React-native 项目,运行SDK报错

复制本地SDK地址,存放Git项目中

Github下载React-native 项目,运行SDK报错
Github下载React-native 项目,运行SDK报错

重新 在项目 cmd中执行 react-native run-android

相关文章:

  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2022-01-18
  • 2022-12-23
  • 2021-09-10
猜你喜欢
  • 2021-11-02
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2021-07-05
  • 2021-12-19
相关资源
相似解决方案