录制视频
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
图 1. 录制应用的视频。
借助 Logcat ,您可以在设备上录制 MP4 视频,以用于营销材料或进行调试等目的。视频时长上限为 3 分钟,并且视频文件不会录制音频。
注意 :无法在搭载 Wear OS 的设备上录制视频。
如需录制应用的视频,请执行以下操作:
打开一个应用项目。
在设备上运行该应用 。
依次点击 View > Tool Windows > Logcat 。
在设备上与屏幕互动,为开始录制视频做好准备。
点击 Logcat 窗口左侧的 Screen Record 。
在 Screen Recorder Options 对话框中,设置录制选项:
Bit Rate :输入比特率。默认值为 4 Mbps。
Resolution :输入宽度和高度值(以像素为单位)。值必须是 16 的倍数。默认值是设备的分辨率。
Show Taps :为点按操作启用视觉反馈。
点击 Start Recording 开始录制。
点击 Stop Recording 停止录制。
在 Save As 对话框中,保存 MP4 文件。
在 Screen Recorder 对话框中,点击其中一个按钮以显示文件位置、在播放器中打开录制的视频或关闭对话框。
使用模拟器录制视频
如果您使用的是模拟器,则可以直接在 Extended Controls 的 Record and Playback 标签页中录制视频。录制视频后,可以将其保存为 WEBM 或 GIF 格式:
图 2. 使用模拟器录制视频。
Content and code samples on this page are subject to the licenses described in the Content License . Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2022-12-06 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]