如果你在Windows系统上开发,并且夏姑娘连接上Android设备进行程序测试, 那么你需要安装合适的USB驱动。本文提供了一些原始设备制造商(OEM)的官方网站, 一般情况下你在这些网站上可以下载到你的Andoid机器的合适的USB驱动程序。 但这不保证你能下载到所有的驱动。
如果你在Mac OS X 或者 Linux上开发, 那你大可不必下载USB驱动。 开始用你的设备开发程序,请阅读 使用硬件设备.
备注: 如果你的手机是Android 开发者专用机 (ADP)之一, 一个Nexus One, 或者Nexus S, 你需要用Google USB 驱动, 而不是OEM驱动。但同时,Galaxy Nexus 驱动,是由 Samsung提供的 (按SCH-I515模型排列).
Installing a USB Driver
First, find the appropriate driver for your device from the OEM drivers table below.
Once you've downloaded your USB driver, follow the instructions below to install or upgrade the driver, based on your version of Windows and whether you're installing for the first time or upgrading an existing driver.
Tip: When you finish the USB driver installation, see 使用硬件设备 for other important information about using an Android-powered device for development.
Caution:
You may make changes to android_winusb.inf
file found inside
usb_driver\
(for example, to add support for other devices),
however, this will lead to security warnings when you install or upgrade the
driver. Making any other changes to the driver files may break the installation
process.
Windows 7
To install the Android USB driver on Windows 7 for the first time:
- Connect your Android-powered device to your computer's USB port.
- Right-click on Computer from your desktop or Windows Explorer, and select Manage.
- Select Devices in the left pane.
- Locate and expand Other device in the right pane.
- Right-click the device name (such as Nexus S) and select Update Driver Software. This will launch the Hardware Update Wizard.
- Select Browse my computer for driver software and click 后一个.
- Click Browse and locate the USB driver folder. (The Google USB
Driver is located in
<sdk>\extras\google\usb_driver\
.) - Click 后一个 to install the driver.
Or, to upgrade an existing Android USB driver on Windows 7 with the new driver:
- Connect your Android-powered device to your computer's USB port.
- Right-click on Computer from your desktop or Windows Explorer, and select Manage.
- Select Device Manager in the left pane of the Computer Management window.
- Locate and expand Android Phone in the right pane.
- Right-click Android Composite ADB Interface and select Update Driver. This will launch the Hardware Update Wizard.
- Select Install from a list or specific location and click 后一个.
- Select Search for the best driver in these locations; un-check Search removable media; and check Include this location in the search.
- Click Browse and locate the USB driver folder. (The Google USB
Driver is located in
<sdk>\extras\google\usb_driver\
.) - Click 后一个 to upgrade the driver.
Windows XP
To install the Android USB driver on Windows XP for the first time:
- Connect your Android-powered device to your computer's USB port. Windows will detect the device and launch the Hardware Update Wizard.
- Select Install from a list or specific location and click 后一个.
- Select Search for the best driver in these locations; un-check Search removable media; and check Include this location in the search.
- Click Browse and locate the USB driver folder. (The Google USB
Driver is located in
<sdk>\extras\google\usb_driver\
.) - Click 后一个 to install the driver.
Or, to upgrade an existing Android USB driver on Windows XP with the new driver:
- Connect your Android-powered device to your computer's USB port.
- Right-click on My Computer from your desktop or Windows Explorer, and select Manage.
- Select Device Manager in the left pane.
- Locate and expand Android Phone in the right pane.
- Right-click Android Composite ADB Interface and select Update Driver. This will launch the Hardware Update Wizard.
- Select Install from a list or specific location and click 后一个.
- Select Search for the best driver in these locations; un-check Search removable media; and check Include this location in the search.
- Click Browse and locate the USB driver folder. (The Google USB
Driver is located in
<sdk>\extras\google\usb_driver\
.) - Click 后一个 to upgrade the driver.
Windows Vista
To install the Android USB driver on Windows Vista for the first time:
- Connect your Android-powered device to your computer's USB port. Windows will detect the device and launch the Found New Hardware wizard.
- Select Locate and install driver software.
- Select Don't search online.
- Select I don't have the disk. Show me other options.
- Select Browse my computer for driver software.
- Click Browse and locate the USB driver folder. (The Google USB
Driver is located in
<sdk>\extras\google\usb_driver\
.) As long as you specified the exact location of the installation package, you may leave Include subfolders checked or unchecked—it doesn't matter. - Click 后一个. Vista may prompt you to confirm the privilege elevation required for driver installation. Confirm it.
- When Vista asks if you'd like to install the Google ADB Interface device, click Install to install the driver.
Or, to upgrade an existing Android USB driver on Windows Vista with the new driver:
- Connect your Android-powered device to your computer's USB port.
- Right-click on Computer from your desktop or Windows Explorer, and select Manage.
- Select Device Manager in the left pane.
- Locate and expand ADB Interface in the right pane.
- Right-click on HTC Dream Composite ADB Interface, and select Update Driver Software.
- When Vista starts updating the driver, a prompt will ask how you want to search for the driver software. Select Browse my computer for driver software.
- Click Browse and locate the USB driver folder. (The Google USB
Driver is located in
<sdk>\extras\google\usb_driver\
.) As long as you specified the exact location of the installation package, you may leave Include subfolders checked or unchecked—it doesn't matter. - Click 后一个. Vista might prompt you to confirm the privilege elevation required for driver installation. Confirm it.
- When Vista asks if you'd like to install the Google ADB Interface device, click Install to upgrade the driver.
OEM Drivers
Note: If your device is one of the Android Developer Phones (purchased from the Google Play publisher site), a Nexus One, or a Nexus S, then you need the Google USB Driver, instead of an OEM driver. The Galaxy Nexus driver, however, is distributed by Samsung (listed as model SCH-I515).