0
votes

I am trying to start with React Native. I have created a sample project, but when I try to run it I get the following error

The SDK directory '/home/praveen/Workspace/ReactNative/AwesomeProject/android/'/home/praveen/Android/Sdk/'' does not exist.

Although the path for the Android SDK is correct :

praveen@CLLAP-CHN-0156:~/Android/Sdk$ ls

add-ons extras platforms skins temp build-tools licenses platform-tools sources tools emulator patcher SDK Readme.txt system-images

3

3 Answers

1
votes

create a file local.properties on [reactproject]/android and add

sdk.dir = /home/[USER]/Android/Sdk

to file local.properties

0
votes

You may need to Configure the ANDROID_HOME environment variable based on the location of the Android SDK. Additionally, consider adding ANDROID_HOME/tools, and ANDROID_HOME/platform-tools to your PATH.

setting up android dev tools

0
votes

(terminal):

export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools

EDIT: should be added as android home path. Full document: https://facebook.github.io/react-native/docs/getting-started.html