上QQ阅读APP看书,第一时间看更新
Running the game on a real device
The first thing to do is to visit your device manufacturer's website and obtain and install any drivers that are needed for your device and operating system.
Tip
Most newer devices won't need a driver. So you may want to just try the following steps first.
The next few steps will set up 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:
- Tap the Settings menu option or the Settings app on your phone/tablet
- This next step will vary slightly for different versions of Android. The Developer options menu is hidden away so as not to trouble regular users. You must perform a slightly odd task to unlock the menu option. Tap the About device or About Phone option. Find the Build Number option and repeatedly tap it until you get a message informing you that You are now a developer!
- Go back to the Settings menu
- Tap Developer options
- Tap the checkbox for USB Debugging
- Connect your Android device to the USB port of your computer
- Click the play icon from the Android Studio toolbar as shown in the next image
- When prompted click OK to run the game on your chosen device.
We are now ready to learn some Java and add real code to the Sub' Hunter project.