Compose 工具
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Android Studio 提供了一系列工具,可帮助您使用 Jetpack Compose 库加速界面设计。您可以通过材料清单 (BOM) 先将必要的依赖项添加到 Gradle 文件中,然后即可开始使用这些工具。
创建与设计规范相符的组件、设计系统和界面。
减少了上下文切换,从而加快了界面构建速度并缩短了运行应用测试时间。
- 实时编辑:应用更改并实时查看,无需进行全面构建。
- 编辑器操作:在 Android Studio 编辑器窗口中使用模板、边栏图标等。
- Lint 检查:通过 lint 检查验证 Compose 代码的正确性。
用于调试界面的工具
分析布局、重组和组合轨迹,以提升应用的界面性能。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-21。
[null,null,["最后更新时间 (UTC):2025-08-21。"],[],[],null,["# Tools for Compose\n\nAndroid Studio provides a slate of tools to help you accelerate your UI design\nusing Jetpack Compose libraries. You can get started using those tools by first\nadding the necessary dependencies to your Gradle file through the Bill of\nMaterials (BOM). \n[Quick Start\nAdd the Compose BOM and library dependencies using the quick start guide\narrow_forward](/develop/ui/compose/setup)\n\nTools for designing your UI\n---------------------------\n\nCreate components, design systems, and screens to align with design specs.\n\n- [Preview UI](/develop/ui/compose/tooling/previews): Preview, organize, and interact with composables.\n- [Preview animations](/develop/ui/compose/tooling/animation-preview): Inspect, debug, and preview animations frame by frame.\n\nTools for developing and testing your UI\n----------------------------------------\n\nAccelerate building the UI and testing the running application with less context\nswitching.\n\n- [Live Edit](/develop/ui/compose/tooling/iterative-development): Apply changes and see them in real time without doing full builds.\n- [Editor actions](/develop/ui/compose/tooling/editor-actions): Use templates, gutter icons, and more in the Android Studio editor window.\n- [Lint checks](/develop/ui/compose/tooling/lint): Verify the correctness of your Compose code with lint checks.\n\nTools for debugging your UI\n---------------------------\n\nAnalyze layout, recompositions, and composition tracing to improve your app's UI\nperformance.\n\n- [Layout Inspector](/develop/ui/compose/tooling/debug#layout_inspector): Inspect a Compose layout in an emulator or physical device.\n- [Compose UI Check](/develop/ui/compose/tooling/debug#compose_ui_check): Inspect Compose UI for accessibility and adaptive issues.\n- [Composition Tracing](/develop/ui/compose/tooling/tracing): Trace your composable functions in a system trace."]]