| ... | @@ -16,7 +16,7 @@ Second step is to get Android Studio to run. |
... | @@ -16,7 +16,7 @@ Second step is to get Android Studio to run. |
|
|
sudo apt-get install openjdk-8-jdk -y &&
|
|
sudo apt-get install openjdk-8-jdk -y &&
|
|
|
wget https://dl.google.com/dl/android/studio/ide-zips/3.4.2.0/android-studio-ide-183.5692245-linux.tar.gz &&
|
|
wget https://dl.google.com/dl/android/studio/ide-zips/3.4.2.0/android-studio-ide-183.5692245-linux.tar.gz &&
|
|
|
tar xzfv android-studio-ide-183.5692245-linux.tar.gz &&
|
|
tar xzfv android-studio-ide-183.5692245-linux.tar.gz &&
|
|
|
~./android-studio/bin/studio.sh
|
|
./android-studio/bin/studio.sh
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
When asked for installation type choose `custom`
|
|
When asked for installation type choose `custom`
|
| ... | @@ -24,9 +24,7 @@ When asked for installation type choose `custom` |
... | @@ -24,9 +24,7 @@ When asked for installation type choose `custom` |
|
|
Make sure the following checkboxes are checked:
|
|
Make sure the following checkboxes are checked:
|
|
|
|
|
|
|
|
- Android SDK
|
|
- Android SDK
|
|
|
|
|
|
|
|
- Android SDK Platform
|
|
- Android SDK Platform
|
|
|
|
|
|
|
|
- Android Virtual Device
|
|
- Android Virtual Device
|
|
|
|
|
|
|
|
Android Studio installs the latest Android SDK by default. Building a React Native app with native code, however, requires the Android 9 (Pie) SDK in particular. Additional Android SDKs can be installed through the SDK Manager in Android Studio.
|
|
Android Studio installs the latest Android SDK by default. Building a React Native app with native code, however, requires the Android 9 (Pie) SDK in particular. Additional Android SDKs can be installed through the SDK Manager in Android Studio.
|
| ... | @@ -38,18 +36,19 @@ The SDK Manager can also be found within the Android Studio "Preferences" dialog |
... | @@ -38,18 +36,19 @@ The SDK Manager can also be found within the Android Studio "Preferences" dialog |
|
|
Select the "SDK Platforms" tab from within the SDK Manager, then check the box next to "Show Package Details" in the bottom right corner. Look for and expand the Android 9 (Pie) entry, then make sure the following items are checked:
|
|
Select the "SDK Platforms" tab from within the SDK Manager, then check the box next to "Show Package Details" in the bottom right corner. Look for and expand the Android 9 (Pie) entry, then make sure the following items are checked:
|
|
|
|
|
|
|
|
- Android SDK Platform 28
|
|
- Android SDK Platform 28
|
|
|
|
|
|
|
|
- Intel x86 Atom_64 System Image or Google APIs Intel x86 Atom System Image
|
|
- Intel x86 Atom_64 System Image or Google APIs Intel x86 Atom System Image
|
|
|
|
|
|
|
|
You need to install kvm to emulate the android phones, and add your current user to the kvm group
|
|
You need to install kvm to emulate the android phones, and add your current user to the kvm group
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
sudo apt-get install qemu-kvm
|
|
sudo apt-get install qemu-kvm -y &&
|
|
|
sudo adduser $USER kvm
|
|
sudo adduser $USER kvm
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
Relogin to load the changes.
|
|
Relogin to load the changes.
|
|
|
|
|
|
|
|
|
The React Native tools require some environment variables to be set up in order to build apps with native code.
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
echo "
|
|
echo "
|
|
|
export ANDROID_HOME=\$HOME/Android/Sdk
|
|
export ANDROID_HOME=\$HOME/Android/Sdk
|
| ... | @@ -61,6 +60,12 @@ export PATH=\$PATH:\$ANDROID_HOME/platform-tools |
... | @@ -61,6 +60,12 @@ export PATH=\$PATH:\$ANDROID_HOME/platform-tools |
|
|
source ~/bashrc
|
|
source ~/bashrc
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
Now we can start the android device:
|
|
|
|
|
|
|
|
- In android launch menu, choose gear icon
|
|
|
|
|
|
|
|
- Choose AVD and launch
|
|
|
|
|
|
|
Inside the mobile repository:
|
|
Inside the mobile repository:
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
| ... | |
... | |
| ... | | ... | |