react-native  运行android程序报 SDK location not found. Define location with sdk.dir in the local 

解决方法:

1、android项目根目录新建 local.properties 内容为:/Users/用户名/Library/Android/sdk  (sdk 目录)


SDK location not found. Define location with sdk.dir in the localSDK location not found. Define location with sdk.dir in the local


2、终端输入  vi  .bash_profile

输入

export ANDROID_HOME=/Users/ouhimehime/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools

如图:
SDK location not found. Define location with sdk.dir in the localSDK location not found. Define location with sdk.dir in the local


最后 保存退出, 如果无法保存 输入 wq!  强制保存退出。

相关文章: