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
4
  • can u share your .bash_profile? Commented Dec 2, 2019 at 5:29
  • possible duplicate of stackoverflow.com/questions/32634352/… Commented Dec 2, 2019 at 5:37
  • I looked in the local.properties, and the sdk.dir is correct. Commented Dec 2, 2019 at 6:05
  • try this in bash_profile export ANDROID_HOME=/Users/USERNAME/Library/Android/sdk export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/platform-tools Commented Dec 2, 2019 at 6:23

1 Answer 1

13

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!

Sign up to request clarification or add additional context in comments.

1 Comment

Awesome, this helped me. I added the line you cited on my Mac's ~/.zshrc file which persists it for future sessions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.