React Native android 构建失败.未找到 SDK 位置 [英] React Native android build failed. SDK location not found
本文介绍了React Native android 构建失败.未找到 SDK 位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开始运行android时出错
I have error when i start running android
What went wrong:
A problem occurred evaluating project ':app'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
推荐答案
- 转到你的 react-native 项目的
android/
目录 - 使用以下行创建一个名为
local.properties
的文件: - Go to the
android/
directory of your react-native project - Create a file called
local.properties
with this line:
sdk.dir = /Users/USERNAME/Library/Android/sdk
其中 USERNAME
是您的 macOS 用户名
Where USERNAME
is your macOS username
这篇关于React Native android 构建失败.未找到 SDK 位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文