Could not determine the dependencies of task ':app:installDebug'.
> 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 '/Users/xxx/workspace/ReactNativeApp/android/local.properties'.
解决:
在android目录下创建
local.properties
内容:
sdk.dir = /Users/xxx/Library/Android/sdk
对于这种定义环境变量的方法
Define location with an ANDROID_SDK_ROOT environment variable
#配置sdk
export ANDROID_SDK_ROOT=/Users/xxxx/Library/Android/sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/emulator
export PATH=$PATH:$ANDROID_SDK_ROOT/tools
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools