To test if your development environment works, run: npx react-native init AwesomeProject cd AwesomeProject npx react-native run-androidĪnd it should work fine. In a later development, having the command line tools available will make everything easier, so similar to what we did to the ANDROID_HOME environment variable, we add the following lines to the $HOME/.bash_profile or $HOME/.bashrc (if you are using zsh then ~/.zprofile or ~/.zshrc) config file: export PATH="$"Īgain, make sure to restart the bash. So, instead of selecting these packages from the Android Studio SDK Manager, we will install it using the command line with the following command: $ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager "platform-tools" "platforms android-29" "build-tools 29.0.2" "add-ons addon-google_apis-google-24"Ī very useful link is this gist, which keeps track of all the available packages, its description, and its versions. Intel x86 Atom_64 System Image or Google APIs Intel x86 Atom System Image.The official React Native environment setup recommends installing the following SDK packages: This installs the latest Android SDK, Android SDK Command-line Tools, and Android SDK Build-Tools, which are required by Flutter when developing for Android. Make sure you restart the bash to apply the changes.Īlso, make sure you have writing permissions to the android home folder: sudo chown -R $(whoami) $ANDROID_HOME 5. Start Android Studio, and go through the ‘Android Studio Setup Wizard’. Instead of only exporting the ANDROID_HOME to the current session of the terminal, we make sure that it’s permanently added to the terminal by adding the following lines to your $HOME/.bash_profile or $HOME/.bashrc (if you are using zsh then ~/.zprofile or ~/.zshrc) config file: export ANDROID_HOME=/opt/android Start Android Studio, and go through the ‘Android Studio Setup. However, you can write your Flutter apps in a number of editors a later step discusses that. The React Native tools require some environment variables to be set up to build apps with native code. Note: Flutter relies on a full installation of Android Studio to supply its Android platform dependencies. Export the ANDROID_HOME environment variable
0 Comments
Leave a Reply. |