Android Tutorial 57
Follow these steps to create a basic Run Configuration for the
Snake application:
- Choose Run, Run Configurations (or right-click the Project and choose
Run As). - Double-click Android Application.
- Name your Run Configuration SnakeRunConfiguration
- Choose the project by clicking the Browse button and choosing the Snake
project. - Switch to the Target tab and, from the preferred AVD list, choose the
Android_Vanilla2.2 AVD created earlier, as shown in Figure.
You can set other options on the Target and Common tabs, but for
now we are leaving the defaults as they are.
Running the Snake Application in the Android Emulator
Now you can run the Snake application using the following steps:
- Choose the Run As icon drop-down menu on the toolbar (the green circle
with the triangle). - Pull the drop-down menu and choose the SnakeRunConfiguration you
created. - The Android emulator starts up; this might take a moment.
- If necessary, swipe the screen from left to right to unlock the emulator, as
shown in Figure. - The Snake application now starts, as shown in Figure.
You can interact with the Snake application through the emulator
and play the game. You can also launch the Snake application from
the Application drawer at any time by clicking on its application
icon.