1

I have updated my $PATH to include the correct location of my adb sdk, but react-native is insisting on using /usr/local/share/android-sdk, instead of /Users/username/Library/Android/sdk/platform-tools. Is there another way to change this? It will not run my android emulator because of this error.

Here is my path:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/username/Library/Android/sdk:Users/username/Library/Android/sdk/platform-tools

bash profile

export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
export ANDROID_HOME=/Users/username/Library/Android/sdk
export ANDROID_SDK=/Users/username/Library/Android/sdk
export PATH=$PATH:/Users/username/Library/Android/sdk
export PATH=$PATH:/Users/username/Library/Android/sdk/platform-tools
shawleigh17
  • 1,147
  • 4
  • 22
  • 42

1 Answers1

9

So, the bash_profile ANDROID_HOME wasn't being recognized, or something. I had to run this in the terminal

export ANDROID_HOME=/Users/username/Library/Android/sdk

to get it to work. Finally did, thanks for your answers!

shawleigh17
  • 1,147
  • 4
  • 22
  • 42
  • 1
    Awesome, this helped me. I added the line you cited on my Mac's ~/.zshrc file which persists it for future sessions. – Reisclef Sep 22 '22 at 15:29