ptg7068951
354 HOUR 24:Writing Android Apps
On the phone, enter this mode by choosing Home, Settings, Applications,
Development. The Development settings are displayed. Choose the USB
debugging option.
Next, in Eclipse, follow these steps:
- Choose Run, Debug Configurations. The Debug Configurations win-
dow opens. - Click the Target tab in the right pane to bring it to the front.
- Change Deployment Target Selection Mode from Automatic to Manual.
- Click Apply and Close.
Connect your Android phone with the USB cord. An Android bug icon
should appear on the bar at the top of the screen. If you drag this bar
down, you should see the message “USB Debugging Connected.”
Back in Eclipse, click the bug icon in the toolbar. The Android Device
Chooser dialog opens (see Figure 24.8).
FIGURE 24.8
Deploying an appon an Android
phone.
If the Android phone has been detected, it appears in the top table in
Figure 24.5 under the Choose a Running Device option.
Select this option, click the device, and click OK. The app runs on the
phone as it did on the emulator.
Like the first program you wrote inJava back in Hour 2, the first app you
created on Android is exceptionally unexceptional. The next project is
more ambitious.