7

OS: Ubuntu

Running npx react-native doctor yields:

results

As you can see react native does not recognise the existence of android studio or sdk.

I have configured my environment variables to the following:

export ANDROID_HOME=$HOME/opt/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

Exact path of Android studio:

/opt/android-studio-ide/android-studio/bin

Exact path of Android Sdk:

/opt/Android/Sdk

Android studios is installed and working, and by extension so is the sdk. I have followed the instructions on how to setup react and ensured all the correct packages have been added. See here:

Snippets from Android Studio

SDK Platforms

SDK Tools 1 SDK Tools 2

1 Answer 1

2

The mistake I made was putting the $HOME variable in export ANDROID_HOME=$HOME/opt/Android/Sdk making the path /home/opt/Android/Sdk

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

Comments

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.