Setting up ANDROID_HOME Environment Variable for React Native in Ubuntu
Way to Configure the ANDROID_HOME Environment Variable for ReactNative :
The ReactNative tools require some environment variables to be set up in order to build apps with native code.
Original Code ::Add the following lines to your
$HOME/.bashrc config file:
Resolve Code :: Add the following line $HOME/ .profile in the Ubuntu Terminal.
bash_profileis specific to
bash. If you're using another shell, you will need to edit the appropriate shell-specific config file.
2. bash_profile not works for some environment variables, we have did lot of research and finds that when we replace bash_profile with .profile , It will works.
$HOME/.profile to load the config into your current shell. Verify that ANDROID_HOME has been added to your path by running
Please make sure you use the correct Android SDK path. You can find the actual location of the SDK in the Android Studio "Preferences" dialog, under Appearance & Behavior → System Settings → Android SDK.