全部博文(153)
分类: LINUX
2009-02-11 09:47:14
If you have an Android device, you can develop and debug your Android applications just as usual. Launching your apps on a device works just the same as on the emulator, but there are a few things to do before you can start.
In Eclipse, you can do this from the Application tab when viewing the Manifest
(on the right side, set Debuggable to true). Otherwise, in the AndroidManifest.xml
file, add android:debuggable="true"
to the
element.
On the T-Mobile G1, go to the home screen, press MENU, select Applications > Development, then enable USB debugging.
/etc/udev/rules.d/50-android.rules
.
For Gusty/Hardy, edit the file to read:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
For Dapper, edit the file to read:
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
chmod a+rx /etc/udev/rules.d/50-android.rules
You can verify that your device is connected by executing adb devices
from your
SDK tools/ directory. If connected, you'll see the device name listed as a "device."
If using Eclipse, select run or debug as usual. You will be presented with a Device Chooser dialog that lists the available emulator(s) and connected device(s). Select the device to install and run the application there.
If using the (adb),
you can issue commands with the -d
flag to target your connected device.