解决安卓环境下 adb : command not found

The React Native command line interface requires the ANDROID_HOME environment variable to be set up. You can configure it in a Terminal using the following command:

export ANDROID_HOME=~/Library/Android/sdk
To avoid doing this every time you open a new Terminal, create (or edit) ~/.bashrc using your favorite text editor and add the following lines:

1、 export ANDROID_HOME=~/Library/Android/sdk
2、 export PATH=${PATH}:${ANDROID_HOME}/tools 将本句改为:
export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools

The second line will add the android tool to your path, which will come in handy in the next step.

Please make sure you export the correct path for ANDROID_HOME if you did not install the Android SDK using Android Studio. If you install the Android SDK using Homebrew, it will be located at /usr/local/opt/android-sdk.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容