繁体   English   中英

“未找到 SDK 位置”android 错误与 React Native

[英]“SDK location not found” android error with React Native

我一直在阅读很多,没有任何工作,已经尝试过:

  • 在local.properties文件中写入skd.dir = /home/fxn/Android/Sdk
  • 将该文件移动到项目的根目录
  • 设置 ANDROID_SDK_ROOT 环境变量

我只想在 apk 文件中构建一个简单的测试 React Native 应用程序,我按照React 文档的说明进行操作,一切都很好,直到我遇到了这个问题。

这是整个错误日志

FAILURE: Build failed with an exception.

* Where:
Build file '/home/fxn/node/reactNative/Test/node_modules/react-native- 
reanimated/android/build.gradle' line: 89

* What went wrong:
A problem occurred configuring project ':react-native-reanimated'.
> 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 
'/home/fxn/node/reactNative/Test/android/local.properties'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to 
get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s

在系统变量部分中,单击新建。 在变量名中,输入 ANDROID_HOME,然后在下一个输入中输入 SDK 路径。

一做二做

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM