ANDROID_HOME
C:\Users\prant\AppData\Local\Android\Sdk
- Open
.bashrc
file in text editor, present in home dir. & paste the following(change the username) and save it:
export ANDROID_HOME=/home/prantikg96/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
- Open a terminal there & write the following to source it:
source ~/.bashrc
- Verify the environment variables:
echo $ANDROID_HOME
echo $PATH
npx @react-native-community/cli@latest init ReactNativeApp01
sdk.dir=C:\\Users\\prant\\AppData\\Local\\Android\\Sdk
sdk.dir=/home/prantikg96/Android/Sdk
android/local.properties
npx react-native run-android
npx react-native run-android && npx react-native start