在“Problems”面板中查看设计工具的问题
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Android Studio 中的 Problems 面板是所有设计工具(例如 Compose Preview、布局编辑器和布局验证)的集中式共享问题面板。如需查看该工具窗口,请依次点击 View > Tool Windows > problems。
图 1. 您可以在共享问题面板中查看设计工具的所有问题。
在 Problems 工具栏中,您可以看到 View Options,例如 Severity Filter and Order、Editor Preview 以及 Quick Fix。
图 2. Problems 面板具有以下视图选项,您可以按严重程度或名称进行排序:Show Warning、Show Weak Warning、Show Server Problem、Show Typo、Show Visual Lint。
具体问题详情会显示在 Editor Preview 的 Issue Details 窗格中。每个问题都可以在内置编辑器中显示,以便您可以预览代码。
查看视觉 lint 问题
Android Studio 会自动检查用 View 编写的布局是否存在视觉 lint 问题。打开布局验证后,您会看到所有布局以多种设备尺寸渲染。所有视觉问题(包括后台视觉 lint 检查)都会显示在 Problems 面板中。
视觉 lint 规则不仅会检查当前文件,还会查看具有不同限定符的同一布局的版本 - 例如,landscape
或 sw600
(如果在执行分析时存在这些规则)。
图 3. Problems 面板中显示了视觉 lint 问题。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# View issues for your design tools in the Problems panel\n\nThe **Problems** panel in Android Studio is a centralized and shared issue panel\nfor all design tools, such as Compose Preview, Layout Editor, and Layout\nValidation. To view the tool window, navigate to **View** \\\u003e **Tool Windows** \\\u003e\n**Problems**.\n\n\n**Figure 1.** You can view all the issues for your design tools in a shared\nissue panel.\n\nFrom the **Problems** toolbar, you can see the **View Options** , such as\nSeverity Filter and Order, the **Editor Preview** , and suggestions for **Quick\nFix**.\n\n\n**Figure 2.** The **Problems** panel has the following view options that you can\nsort by either severity or name: Show Warning, Show Weak Warning, Show Server\nProblem, Show Typo, Show Visual Lint.\n\nIndividual issue details are displayed in the **Issue Details** pane in the\n**Editor Preview**. Each issue can be displayed in the built-in editor so that\nyou can preview the code.\n\nView issues with visual lint\n----------------------------\n\nAndroid Studio automatically checks for visual lint issues for your layouts that\nare written in Views. When you open\n[**Layout Validation**](/studio/debug/layout-inspector#layout-validation), you\ncan see all your layouts render in multiple device sizes. All visual issues,\nincluding background visual linting, appear in the **Problems** panel.\n\nVisual linting rules look not only at the current file, but also at the versions\nof the same layout with different qualifiers--for example, `landscape` or\n`sw600`, if they exist when performing the analysis.\n\n\n**Figure 3.** Visual lint issues are displayed in the **Problems** panel."]]