截取设备当前屏幕的屏幕截图

发布于 2024-09-11 03:08:05 字数 679 浏览 2 评论 0原文

当一个人想要在 Play 商店(以前称为 Android Market)上发布他的应用程序时,他可以上传他的应用程序的屏幕截图。我想用我当前用来测试应用程序的设备(摩托罗拉 Droid)截取这些屏幕截图。

Play商店里有一些应用程序可以让你截图,但你必须root你的手机,我不想这样做。 Stack Overflow 中有一些相关主题,人们希望从代码中截取屏幕截图(此处)。不过,我只想使用当前设备截取正在运行的应用程序的屏幕截图,该设备通过 USB 连接到我的计算机;我正在通过 Eclipse 进行开发,因此应该有一种方法可以告诉您正在运行的设备应该通过 SDK 进行屏幕截图,对吗?

一些网站(例如 LifeHacker)提到了一种方法来做到这一点,

要截屏,您需要在设置下启用USB调试,安装Android软件开发套件,然后使用调试工具连接到手机

但他们没有解释我实际需要执行的步骤-步。

如果有人能帮助我,我将非常感激。

When one wants to publish his app on the Play Store (previously known as Android Market), he can upload screenshots of his app. I would like to take these screenshots with my current device (Motorola Droid) that I'm using to test the application.

There are some apps on the Play Store that allow you to take screenshots, but you have to root your phone, which I don't want to. There are related topics within Stack Overflow where people want to take screenshots out of there code (here). However I just want to take screenshots of my running app with the current device, which is connected via USB to my computer; I'm developing via Eclipse, so there should be a way to tell your running device that it should take a screenshot via the SDK, right?

Some website (e.g. LifeHacker) mention a way to do this,

To take a screenshot, you'll be required to enable USB Debugging under the settings, install the Android software development kit, and then connect to the phone with a debug tool

but they don't explain what I actually need to do step-by-step.

I would really appreciate if someone can help me out.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

诗笺 2024-09-18 03:08:05

由于您可能是一名开发人员,因此您拥有用于运行 Android 应用程序的 SDK 和工作 Eclipse。只需插入手机,并确保在手机上启用 USB 调试,设备需要显示在 Eclipse 的 DDMS 透视图中。

一旦您的设备显示在DDMS 透视图中,就会出现用于捕获屏幕的图标。

Since you probably are a developer, you have SDK and working Eclipse for running Android applications. Just plug in the phone, and make sure you enabled on the Phone the USB Debugging, the device needs to show up in the DDMS perspective of Eclipse.

Once your device shows up in the DDMS perspective there is in icon there to capture the screen.

驱逐舰岛风号 2024-09-18 03:08:05

如果您已经在使用 Eclipse 开发应用程序,那么您已经安装了 Android 软件开发工具包。因此,只需打开 sdk-android/tools 目录中的 ddms 实用程序即可。在那里,您可以通过选择设备并按:Ctrl+S设备 -> 屏幕截图...)来截取屏幕截图。

ddms 看起来像:

alt text

If you are already using Eclipse to develop your app, then you already have the Android software development kit installed. So, just open the ddms utility that is on the sdk-android/tools directory. There, you can take screenshots by selecting your device and pressing: Ctrl+S (Device -> Screen capture…).

ddms looks like:

alt text

雨夜星沙 2024-09-18 03:08:05

Android SDK 附带了一个工具,可以帮助您在设备连接到计算机时进行屏幕截图。我将解释两者。首先,您需要将设备插入计算机并让 adb 识别它(又名,当您运行“adb devices”时,它会显示您的手机)。

然后您可以使用 Eclipse 或 DDMS:

DDMS

  1. 打开 ddms

  2. 在左侧列表中单击您的设备。

  3. 进入菜单设备-->屏幕捕获。

Eclipse

  1. 打开 Eclipse。

  2. 打开“设备”视图。您可以通过 Window --> 访问它显示视图 -->其他... -->安卓-->设备。

  3. 单击您的设备。

  4. 在设备视图中,右上角有一个小图片。如果将鼠标悬停在其上,它会显示“屏幕捕获”。单击该按钮。

这两种方法都会引导您使用相同的捕获屏幕截图的工具。有时它可能会有点问题 - 有时我需要关闭/重新打开窗口才能获取屏幕截图。

There's a tool that the Android SDK comes with to help you take screenshots if your device is connected to the computer. I'll explain both. First, for both you need to plug your device into the computer and have it be recognized by adb (aka, when you run "adb devices" it shows your phone).

Then you can either use Eclipse or DDMS:

DDMS

  1. Open ddms.

  2. Click on your device in the list on the left.

  3. Go to the menu Device --> Screen Capture.

Eclipse

  1. Open Eclipse.

  2. Open the "devices" view. You can get to it via Window --> Show View --> Other... --> Android --> Devices.

  3. Click on your device.

  4. In the Devices view, there's a little picture in the upper right corner. If you hover your mouse over it it says "Screen Capture." Click that.

Both methods lead you to the same tool which captures screenshots. Sometimes it can be a little buggy - occasionally I need to close/reopen the window in order to get it to take a screenshot.

鹤仙姿 2024-09-18 03:08:05

只是注意到 ddms 已被弃用,该功能现在可以在监控工具 (tools/monitor) 中使用。

从控制台窗口打开监视器,然后在左侧面板中选择设备。单击上面的相机(屏幕捕获)图标,您将看到当前屏幕。然后您可以根据需要旋转并复制或保存图像。如果您要保存多个镜头或第一次没有得到您想要的内容,刷新将获取免费的屏幕截图。

Just noting that ddms is deprecated and this function is now available in the monitor tool (tools/monitor) instead.

Open monitor from a console window and select the device in the left panel. Click the camera (Screen Capture) icon above and you'll see the current screen. Then you can rotate if needed and copy or save the image. Refresh will grab a free screen grab in case you are saving multiple shots or didn't get what you wanted the first time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文