1.react native --- android 配置

Q1. NDK is missing a “toolchains” directory.If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /usr/local/opt/android-sdk-macosx.If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

1
2
3
4
5
6
7
8
A1.直接下载 https://developer.android.com/ndk/downloads/index.html(可能需要翻墙哦)
最后去命令行输入
open .zshrc
然后复制下面代码进去:(路径可能不一样)
# For Android
export ANDROID_SDK_ROOT=/usr/local/opt/android-sdk
export ANDROID_NDK_ROOT=/usr/local/opt/android-ndk
Alex Chou wechat
ex. subscribe to my blog by scanning my public wechat account
Donate comment here