greenskin
greenskin

Reputation: 554

react-native: ANDROID_HOME variable is not set on Mac OS Big Sur

I'm trying to build my react-native project on Mac OS Big Sur. Having several issues, I ran react_native doctor command to verify my environment. Here is diagnostics report:

✖ Android SDK - Required for building and installing your app on Android
   - Versions found: N/A
   - Version supported: 29.0.3
 ✖ ANDROID_HOME

Following multiple posts on blogs and answers on SO, I created/edited:

Path typed in ANDROID_HOME is taken from Android Studio SDK manager. Unfortunately, nothing worked permanently. WHat's worse, I'm not talking only about restarts - it seems that restarting VS Code (or its terminal) resets PATH variables and ANDROID_HOME is no longer available.

Please help.

Upvotes: 3

Views: 3247

Answers (1)

greenskin
greenskin

Reputation: 554

Ok, so I failed to notice that I'm using zsh terminal (visible in title bar of SYSTEM terminal window - didn't notice it because I was using Visual Studio Code terminal!). So, I created two files in my Home: ~/.zprofile and ~/.zshrc with contents provided in a question. It worked. Thought it may be worthy for someone struggling the same lack of Mac OS knowledge as I do.

Upvotes: 5

Related Questions