Hey guys, welcome to my first tutorial on Android Development. This time, I got a tutorial on how you could use an actual Android device to debug/run your android project.
It’s a new series I am going to start on my blog. I will be writing articles in this series to share Android development tips. Since I am also a newbie to android development 🙂 I will be writing tutorials as soon as I learn new stuff.
Since it’s the first tutorial in this series, I chose a simple tip to debug Android app directly to an Android device rather than an emulator via ADB (Android Device Bridge).
Using an actual Android device have benefits over an Emulator. One of the main benefits is that we could save some amount of resource which an emulator consumes. Also, there are some cases where an app need some services (eg: Play Games Service) which may not be present in every emulator by default. But an actual device will obviously have those.
Simply, using an actual Android device for debugging will give you a bunch of benefits. Before getting started, you need to have a USB cable to connect your device to PC. In the next tutorial in this series, I will be giving you the trick to implement ADB wirelessly! (through wifi). Without wasting any time, let’s get started.
- Before connecting the Android device to PC, there is something needs to be done. You need to enable ADB on your device. To do that open Settings >> Device Options >> Developer Options (This path may vary). If you can’t see developer options, you need to enable it by tapping rapidly on Serial Number option in the device options until it says “You are a developer now”.
- You will see the option to Enable ADB in developer options. Enable it by tapping on it.
- Now you are good to go! Open Android Studio on PC and connect your Device to PC via USB cable. Make sure that the device gets detected. After connecting the device, Run the app on Android studio you are currently working on.
- By doing so, there you will get a pop-up on your Android device to Allow USB Debugging. Now allow it by pressing the OK button.
- That’s it! Your device will be listed in the following windows and it can be used to debug your Android Project.
I hope you got succeeded to created an ADB with your Android Device. You may ask any queries in the comment section below. Share this article with your friends! and have a nice day 🙂