In this tutorials, we will see how to add Android Device to Android Studio, so that we can run or test the application on Android Physical Device.
Android Device to Android Studio :
We can run Android applications in 2 different modes.
- Running on Android Emulator and
- Running on Actual Device
In the previous tutorial, we discussed how to run the android application on emulator, now we will see how to run on our actual Android device (Android Mobile/Tablet).
Configuring the Android Device :
- In your Android Phone Go to Settings and click on About Phone
- Where you can see the Build Number, click on build number for 8 times and finally you will be prompted, that You are a Developer!
- Now get the USB Cable and connect it to your PC/Workstation.
- Go back to Settings in your Android device and search for the Developer Options.
- Click on Developer Options, toggle it and Click on OK.
6. Enable OEM Unlocking , Now it will ask you for Screen Lock and After that click on ENABLE.
7. Main thing, Toggle Allow USB Debugging and click on OK
After all this steps you will be prompted with a dialogue, which will ask you Allow USB Debugging click on OK.
That’s It.
Now go and Click the Run Button again in your Android Studio, now you can able to find your device under connected devices. Select your device and then click OK.
That’s it. After Gradle build you can see your app running in your device.
Happy Learning 🙂