1
votes

after run sudo react-native run-android
echo error:

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

after add sdk.dir in local.properties is work, but i want fix generaly.

in ~/.bashrc

export ANDROID_HOME="$HOME/programs/android_sdk" export PATH="$PATH:$ANDROID_HOME/tools" export PATH="$PATH:$ANDROID_HOME/platform-tools"

but not work!
how can i fix it?

1

1 Answers

0
votes

Try adding like this

Add the following in ~/.bash_profile or ~/.bashrc.

export ANDROID_HOME=/usr/local/share/android-sdk
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/build-tools/23.0.1:$PATH

Worked for me this way.Hope it works for you too !