How to Run Your Android Studio Project on Your Smartphone

When developing an Android app, it is critical to test your application on a real device as well as emulators. This article explains how to configure your development environment and Android-powered device for testing and debugging.

Running Your Android Project in Your Smartphone

  1. Install the ADB Driver (Only for Windows)
  2. Connect your Android device to your computer using a USB cable.
  3. On the device, launch the “Settings” app.
  4. Scroll all the way to the bottom to find the “About phone” item.
  5. Scroll all the way to the bottom to find the “Build number” section.
  6. Tap on “Build Number” seven times in a row.
  7. The message “You are now a developer!” should appear.
  8. Return to the main “Settings” page.
  9. Scroll to the bottom of the page to find the “Developer options” item.
  10. Turn on the “USB Debugging” switch and press the “OK” button.
  11. Unplug and reconnect the device
  12. “Allow USB Debugging?” appears as a dialog box.
  13. Check the box next to “Always allow from this computer” and then click “OK.”
  14. We can now run apps from Android Studio on our device:
  15. Choose one of your projects and press the “Run” button in the toolbar.
  16. Select the “Choose a running device” radio button in the “Choose Device” window that appears, then select the device and click OK.
  17. When Gradle is finished building, Android Studio should install and launch the app on your connected device.

References:

https://guides.codepath.com/android/Running-Apps-on-Your-Device#enable-usb-debugging

https://miro.medium.com/max/1400/1*7nKdUlVkd1X6G9_7RN4Btw.jpeg

Leave a Comment

Your email address will not be published. Required fields are marked *