react-native: Android Studio is not being detected..
When I run npx react-native doctor
everything seems ok except that it’s not recognizing Android studio
I have the latest Android studio arctic fox installed and I have tried to run the project using Android Studio and it was working… but when I run the project using npx react-native run-android
It fails because of the Android environment…
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 15 (4 by maintainers)
As said above, Android Studio does not have to be installed into
/opt
; RN will find it and SDK in different locations as long as you have followed Environment Setup correctly, setting theANDROID_HOME
environment variable, and adding emulator and platform-tools paths toPATH
.The doctor can’t find it wrongly, because, if I recall correctly, it relies on a 3rd party dependency to find software installed on the system, and that 3rd party dependency just looks for Android studio and SDK at the static location in
/opt
, and does not check environment variables RN actually relies on.Closing as this issue is with the CLI and should be opened here:
https://github.com/react-native-community/cli/issues
@birdofpreyru please open a new issue there. Also Android Studio doens’t need to be installed inside
/opt
. I do have it in another folder and doctor is green for me