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.
Member comments are a way for members to communicate, interact, and ask questions about a lesson.
The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io
Be on-Topic
Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.
Avoid meta-discussion
Code Problems?
Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context
Details and Context
Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!