yay -Sy android-sdk android-sdk-cmdline-tools-latest android-sdk-platform-tools- The SDK will be installed to
/opt/android-sdk; givenANDROID_HOME='/opt/android-sdk', the following should be added to $PATH:
"$ANDROID_HOME/tools/bin/"
"$ANDROID_HOME/platform-tools/"
"$ANDROID_HOME/cmdline-tools/latest/bin"
"$ANDROID_HOME/emulator"
sudo chmod -R 777 /opt/android-sdkworks around permission issues due to the package being installed on/opt
Example: Install the SDK for Android 8.1 (v28)
exec yes | sdkmanager --licenses && sdkmanager "platforms;android-28" "build-tools;28.0.3" "platform-tools" "emulator" "system-images;android-28;default;x86"
To create a device with a Google Play Store, change "default" to "google_apis_playstore".
sudoedit /etc/modules-load.d/virtualbox.confand paste in
vboxdrv
vboxnetflt
vboxnetadp
vboxpci
sudo modprobe vboxdrv vboxnetadp vboxnetflt- Restart the computer for those modules to be picked up
avdmanager --verbose create avd --force --name and28 --package "system-images;android-28;google_apis;x86" --abi "x86" --sdcard 64M
After that run the emulator with emulator @name (matches the --name used in the command above)
Related to bug https://stackoverflow.com/questions/57313661/stuck-on-info-starting-js-server
npx react-native start
npm run-script android