For Android, we can connect a physical device that will be autodetected by react-native run-android
, just like the emulator. Make sure to shut down the emulator first however - so that only one adb device is connected at a time.
Instructor: [00:00] To deploy to an Android device, first make sure the device is configured for USB debugging. Enable developer options by going to Settings, About Phone, and tap the build number row seven times. Then there will be a developer options setting that will allow you to enable USB debugging.
[00:31] In a terminal, run adb devices if you would like to check that your device is properly connected. There can only be one connected device at a time for React Native to properly detect and run, so close any emulators that you have open to ensure that only the device is showing. Then run react-native run-android like normal. It will automatically detect your connected device and run the app.