shawleigh17
shawleigh17

Reputation: 1187

React-Native trying to run android, getting an error about /bin/sh: /usr/local/share/android-sdk/platform-tools/adb: No such file or directory

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

Upvotes: 1

Views: 4307

Answers (1)

shawleigh17
shawleigh17

Reputation: 1187

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!

Upvotes: 13

Related Questions