Configure andrion environment variables in the Mac environment-problems caused by RectNative

build 安卓proje时 遇到此问题> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

Check sdk.dir and found that the settings are no problem, sdk.dir=/Users/apple/Library/Android/sdk, then the next step is to set ANDROID_HOME, the problem is coming, according to the export ANDROID_HOME= /Users/apple provided by fellow technicians The /Library/Android/sdk method does not work, so here is how to set it up successfully

First:

 Open terminal

Second:

Type cd ~/

next: (Follow the instructions below to operate step by step)

touch .bash_profile 

open .bash_profile

A file will pop up at this time, enter the following information in the file

export ANDROID_HOME=/Users/apple/Library/Android/sdk (这里的SDK路径换成自己电脑andrion sdk路径,若不知如何查看,请访问本博主的另一篇查看路径文章)
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools

Save after entering the above information

Then enter the following command in the terminal

source .bash_profile

At this time, the setting is complete. If you are sure that it is successful, you can enter adb in the terminal to check whether the adb command is available. If it is available, it means the setting is successful.





Guess you like

Origin blog.csdn.net/u010670117/article/details/78296729