2.3 KiB
2.3 KiB
id | title | layout | category | permalink | next |
---|---|---|---|---|---|
android-setup | Android Setup | docs | Quick Start | docs/android-setup.html | tutorial |
NOTE: This guide needs to be extended for Windows. Can you send us a pull request?
This guide describes basic steps of the Android development environment setup that are required to run React Native android apps on an android emulator. We don't discuss developer tool configuration such as IDEs here.
If you already have the Android SDK
- IMPORTANT: Make sure the
ANDROID_HOME
environment variable points to your existing Android SDK - Make sure to update the required packages to the versions mentioned below (see screenshots)
If you don't have the Android SDK
- Install the latest JDK
- Install the Android SDK with
brew install android-sdk
- Add this to your
~/.bashrc
,~/.zshrc
or whatever your shell uses: export ANDROID_HOME=/usr/local/opt/android-sdk
Configure your SDK
- Start a new shell and run
android
; in the window that appears make sure you check:
- Android SDK Build-tools version 23.0.1
- Android 6.0 (API 23)
- Android Support Repository
- Click "Install Packages"
Install Genymotion
Genymotion is much easier to set up than stock Google emulators. However, it's only free for personal use. If you want to use the stock Google emulator, see below.
- Download and install Genymotion
- Open Genymotion
- Create a new emulator and start it
Alternative: Create a stock Google emulator
- Start a new shell and run
android
; in the window that appears make sure you check:
- Intel x86 Atom System Image (for Android 5.1.1 - API 22)
- Intel x86 Emulator Accelerator (HAXM installer)
- Click "Install Packages".
- Configure hardware acceleration (HAXM), otherwise the emulator is going to be slow.
- Create an Android Virtual Device (AVD):
- Run
android avd
and click on Create... - With the new AVD selected, click
Start...