If you have just completed the tutorial Building your first Android game or if you have just forgotten how to get your latest project from your PC and onto a device – here is how to do it. This tutorial will show you how to run the game on your device while connected via a USB cable. Once you have done this  the game will remain on your device to play, with or without being connected to your development machine.

patreon

 

 

About this project

Skill level 1
Time to complete 10 minutes

New concepts

  • Building an Android project

Recommended preparation tutorials

Assumed previous experience

The first thing to do is to visit your device manufacturer’s website and obtain and install any drivers that are required for your device and operating system. The next few steps will setup the Android device for debugging. Note that different manufacturers structure the menu options slightly differently to others. But the following sequence is probably very close, if not exact for enabling debugging on most devices.

  1. Tap the Settings menu option or the Settings app on your phone/tablet.
  2. Tap Developer options.
  3. Tap the checkbox for USB Debugging.
  4. Connect your Android device to the USB port of your development system.
  5. Click the Play icon from the Android Studio toolbar as shown.

android-studio-play-app

When prompted click OK to debug the game on your chosen device.

The game will now run on the device as shown.

deploying-your first-android-game

As we progress through the tutorial-related mini-projects we will see how the device outputs information to Android Studio so we can monitor and debug our games. This is the next Android tutorial designed to be read in conjunction with these Java tutorials.

 

patreon