source ~/.bash_profile生效后 重新打开终端失效
设置RN 安卓环境变量遇到的问题
运行emulator -adv 名字
提示[140736539149248]:ERROR:./android/qt/qt_setup.cpp:28:Qt library not found at错误
且确保有export PATH=${PATH}:${ANDROID_HOME}/emulator在tools变量前面
运行react-native run-android
提示SDK location not found. Define location with sdk.dir in the local.properties
解决办法按照参考二更改生效
.zlogin文件
添加:
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
.bashrc文件
添加:
export ANDROID_HOME=${HOME}/Library/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/emulator
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
export PATH=${PATH}:${ANDROID_HOME}/tools
参考一:http://www.cnblogs.com/tomato0906/articles/6048383.html
参考二:http://www.cnblogs.com/EasonJim/p/6283190.html
网友评论