Reputation: 133
OS: Ubuntu
Running npx react-native doctor
yields:
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
Upvotes: 7
Views: 3395
Reputation: 133
The mistake I made was putting the $HOME
variable in export ANDROID_HOME=$HOME/opt/Android/Sdk
making the path /home/opt/Android/Sdk
Upvotes: 2