1. 程式人生 > 實用技巧 >android截圖sdk_如何使用Android SDK在PC上拍攝Android螢幕截圖

android截圖sdk_如何使用Android SDK在PC上拍攝Android螢幕截圖

android截圖sdk

android截圖sdk

image

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版本。

image

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可能沒有以管理員許可權執行。

image

配置驅動程式和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除錯。

image

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檔案。

image

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裝置。 選擇裝置,單擊裝置選單,然後選擇螢幕捕獲

image

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.

使用視窗頂部的“重新整理”按鈕拍攝新的螢幕截圖。 使用“儲存”按鈕將螢幕快照儲存到影象檔案,或使用“複製”按鈕將螢幕快照複製到剪貼簿。 您也可以旋轉螢幕快照,然後使用“旋轉”按鈕進行儲存或複製。

image

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