android截图sdk_如何使用Android SDK在PC上拍摄Android屏幕截图

android截图sdk_如何使用Android SDK在PC上拍摄Android屏幕截图

android截图sdk

android截图sdk_如何使用Android SDK在PC上拍摄Android屏幕截图

There’s no built-in way to take screenshots if your device is using a 2.x version of Android, such as Gingerbread or Froyo. However, you can take screenshots by connecting your Android phone to your computer and using Google’s Android SDK.

如果您的设备使用的是Android 2.x版(例如Gingerbread或Froyo),则没有内置的方式来截屏。 但是,您可以通过将Android手机连接到计算机并使用Google的Android SDK来截取屏幕截图。

If you’re using Android 4.0 or later, you can take screenshots by pressing the Volume Down and Power buttons at the same time. if your device is rooted, you can also install one of many screenshot applications from Google Play.

如果您使用的是Android 4.0或更高版本,则可以同时按下“降低音量”和“电源”按钮来截取屏幕截图。 如果您的设备已植根,则还可以从Google Play安装许多屏幕截图应用程序之一。

安装Android SDK (Installing the Android SDK)

Before installing the Android software development kit (SDK), you’ll need to download and install the Java Development Kit (JDK) from Oracle’s website. Download and install the 32-bit version of the JDK, even if you have a 64-bit version of Windows – the Android SDK seems to want the 32-bit version. The 32-bit version is identified as the Windows x86 version on Oracle’s website.

在安装Android软件开发套件(SDK)之前,您需要从Oracle网站下载并安装Java开发套件(JDK) 。 下载并安装32位版本的JDK,即使您使用的是64位版本的Windows,Android SDK似乎也需要32位版本。 Oracle网站上将32位版本标识为Windows x86版本。

android截图sdk_如何使用Android SDK在PC上拍摄Android屏幕截图

After the JDK is installed on your system, download the Android SDK from Google’s Android Developers website.

在您的系统上安装JDK之后,请从Google的Android开发者网站下载Android SDK

Next, open the Android SDK Manager from your Start menu (just search for “SDK Manager”). You’ll have to right-click the SDK Manager shortcut and select Run as Administrator if you installed the Android SDK for all users.

接下来,从“开始”菜单中打开Android SDK Manager(只需搜索“ SDK Manager”)。 如果您为所有用户安装了Android SDK,则必须右键单击SDK Manager快捷方式,然后选择以管理员身份运行。

Check the Android SDK Platform-tools box and click the Install button to install it – the platform tools package contains the adb (Android debug bridge) utility, which we’ll need. If you see an error, the SDK Manager may not be running with administrator permissions.

选中“ Android SDK平台工具”框,然后单击“安装”按钮以进行安装-平台工具包中包含我们需要的adb(Android调试桥)实用程序。 如果看到错误,则说明SDK Manager可能没有以管理员权限运行。

android截图sdk_如何使用Android SDK在PC上拍摄Android屏幕截图

配置驱动程序和USB调试 (Configuring Drivers & USB Debugging)

You’ll need the drivers for your Android device installed. These can generally be acquired from your manufacturer. For example, if you’re using a Samsung device, install Samsung Kies to get the appropriate drivers for your Android. The drivers will be automatically installed with the software package.

您需要为您的Android设备安装驱动程序。 这些通常可以从制造商处获得。 例如,如果您使用的是Samsung设备,请安装Samsung Kies以获取适用于Android的驱动程序。 驱动程序将与软件包一起自动安装。

You must enable USB debugging on your Android device by going into its Settings screen, tapping Applications, tapping Development, and checking the USB debugging check box.

您必须通过进入Android设备的“设置”屏幕,点击“应用程序”,点击“开发”,然后选中“ USB调试”复选框来启用USB调试。

android截图sdk_如何使用Android SDK在PC上拍摄Android屏幕截图

Once the drivers are installed and USB debugging is enabled, connect your Android phone to your computer using its included USB cable. Your computer should automatically configure the phone with the required drivers.

安装驱动程序并启用USB调试后,请使用随附的USB电缆将Android手机连接到计算机。 您的计算机应使用所需的驱动程序自动配置电话。

截屏 (Taking a Screenshot)

To take a screenshot, you’ll have to launch the Dalvik Debug Monitor application. Navigate to the folder you installed the Android SDK to — C:\Program Files (x86)\Android\android-sdk by default if you installed it for all users. Launch the ddms.bat file located inside the tools subfolder in this folder.

要截图,您必须启动Dalvik Debug Monitor应用程序。 如果为所有用户安装了Android SDK,则导航至默认情况下的安装文件夹-C:\ Program Files(x86)\ Android \ android-sdk。 启动位于此文件夹的工具子文件夹内的ddms.bat文件。

android截图sdk_如何使用Android SDK在PC上拍摄Android屏幕截图

You can make the Dalvik Debug Monitor easier to launch in the future by creating a shortcut for it – for example, you can drag and drop it to your Start button to quickly create a shortcut.

您可以通过为其创建快捷方式来使Dalvik Debug Monitor将来更容易启动–例如,您可以将其拖放到“开始”按钮以快速创建快捷方式。

Once it’s launched, you should see your connected Android device in the window. Select the device, click the Device menu, and select Screen capture.

启动后,您应该在窗口中看到已连接的Android设备。 选择设备,单击设备菜单,然后选择屏幕捕获

android截图sdk_如何使用Android SDK在PC上拍摄Android屏幕截图

Use the Refresh button at the top of the window to take a new screenshot. Save the screenshot to an image file with the Save button or copy it to your clipboard with the Copy button. You can also rotate the screenshot prior to saving or copying it with the Rotate button.

使用窗口顶部的“刷新”按钮拍摄新的屏幕截图。 使用“保存”按钮将屏幕快照保存到图像文件,或使用“复制”按钮将屏幕快照复制到剪贴板。 您也可以旋转屏幕快照,然后使用“旋转”按钮进行保存或复制。

android截图sdk_如何使用Android SDK在PC上拍摄Android屏幕截图

If you want to take a screenshot in the future, just connect your Android phone to your computer, launch the ddms.bat file (possibly from a shortcut), and use the Screen capture tool.

如果您想在将来拍摄屏幕快照,只需将Android手机连接到计算机,启动ddms.bat文件(可能是通过快捷方式),然后使用屏幕捕获工具即可。

翻译自: https://www.howtogeek.com/121121/how-to-take-android-screenshots-on-your-pc-with-the-android-sdk/

android截图sdk