From the course: Android Studio Essential Training

Build and launch apps on Android devices

From the course: Android Studio Essential Training

Build and launch apps on Android devices

- [Instructor] After creating virtual devices or attaching a physical device, you're ready to launch your apps. From within the IDE, look at this menu. You'll see that there's a list of available modules and your app module should be displayed. Then you'll see a list of your available devices. Under running devices, you'll see either virtual devices that you've started up or physical devices that you've attached. You'll also see other available virtual devices listed under available devices. When you run the app, if you select one of these, it'll start up automatically. Now, for this test, I've set up two virtual devices. One emulating a phone and the other, a tablet, and I'm running them at the same time. On this list, I see the Nexus 9 is the tablet and the Pixel 4 is the phone. I'm going to select the Pixel 4 and then run the app. At the bottom of the screen, I'll see a message that the Gradle build process is running, and then after that, at some point, I'll see a message that the app is being installed. Once the app is built, it's installed on the device. Now I'll come back to the IDE and I'm going to choose the Nexus 9 this time and run the app. Once again, I see the build message down at the bottom, and then the install message, and then the app launches on the tablet. Now I'm going to go back a step on both devices and then I'll go back to the IDE, and this time, I'll run the app on both devices simultaneously. I'll choose select multiple devices and I'll choose all the devices I want to use. I'll choose these two, the Nexus 9 and the Pixel 4, those are the ones that are already running, and click okay and then I'll click the run button again, I'll see the build message down at the bottom, and then I'll see a series of install messages, and then the app is run on both devices. You can have as many physical devices attached to your computer as you need and you can have as many virtual devices running as you have memory for. This makes it easy to run your app simultaneously on as many devices as you need to test, including phones, tablets, and Chromebooks.

Contents