Issue
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:
.bash_profile file in my Home directory
.bashrc file in my Home directory
edited /etc/profile file ...and added following lines to these files:
export ANDROID_HOME=/Users/piotrzielinski/Library/Android/sdk export PATH=$PATH:$ANDROID_HOME/platform-tools export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/tools/bin export PATH=$PATH:$ANDROID_HOME/emulator
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.
Solution
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.
Answered By - greenskin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.