1、官网下载jdk8 https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
2、环境变量配置(java、android)
open .
zshrc -e 或者 .bash_profile
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_301.jdk/Contents/Home
PATH=$JAVA_HOME/bin:$PATH:.
CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.
export JAVA_HOME
export PATH
export CLASSPATH
export ANDROID_HOME=/Users/lishengling/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
alias pod="arch -x86_64 pod"
执行 source .zshrc
3、授权 sdkmanager --licenses
4、检测环境 java -version
5、运行 react-native run-android