使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
ResourceInspection
在 Android Studio 的实时布局检查器中显示自定义视图的属性。
最近更新时间 |
稳定版 |
候选版 |
Beta 版 |
Alpha 版 |
2022 年 1 月 26 日 |
1.0.1 |
- |
- |
- |
声明依赖项
如需添加 ResourceInspection 的依赖项,您必须将 Google Maven 代码库添加到项目中。如需了解详情,请参阅 Google 的 Maven 代码库。
在应用或模块的 build.gradle
文件中添加所需工件的依赖项:
Groovy
dependencies {
implementation "androidx.resourceinspection:resourceinspection-annotation:1.0.1"
}
Kotlin
dependencies {
implementation("androidx.resourceinspection:resourceinspection-annotation:1.0.1")
}
如需详细了解依赖项,请参阅添加 build 依赖项。
反馈
您的反馈将帮助我们改进 Jetpack。如果您发现了新问题,或对此库有任何改进建议,请告诉我们。创建新问题前,请先查看此库中的现有问题。您可以点击星标按钮,为现有问题投票。
创建新问题
如需了解详情,请参阅问题跟踪器文档。
版本 1.0
版本 1.0.1
2022 年 1 月 26 日
发布了 androidx.resourceinspection:resourceinspection-annotation:1.0.1
和 androidx.resourceinspection:resourceinspection-processor:1.0.1
。版本 1.0.1 中包含这些提交内容。
bug 修复
版本 1.0.0
2021 年 11 月 3 日
发布了 androidx.resourceinspection:resourceinspection-annotation:1.0.0
和 androidx.resourceinspection:resourceinspection-processor:1.0.0
。版本 1.0.0 中包含这些提交内容。
1.0.0 的主要功能
- ResourceInspection 库提供了一个注解处理器,供库开发者在 Android Studio 的实时布局检查器中显示自定义视图的属性。
版本 1.0.0-rc01
2021 年 10 月 27 日
发布了 androidx.resourceinspection:resourceinspection-annotation:1.0.0-rc01
和 androidx.resourceinspection:resourceinspection-processor:1.0.0-rc01
。版本 1.0.0-rc01 中包含这些提交内容。
版本 1.0.0-beta01
2021 年 9 月 15 日
发布了 androidx.resourceinspection:resourceinspection-annotation:1.0.0-beta01
和 androidx.resourceinspection:resourceinspection-processor:1.0.0-beta01
。版本 1.0.0-beta01 中包含这些提交内容。
bug 修复
版本 1.0.0-alpha03
2021 年 6 月 30 日
发布了 androidx.resourceinspection:resourceinspection-annotation:1.0.0-alpha03
和 androidx.resourceinspection:resourceinspection-processor:1.0.0-alpha03
。版本 1.0.0-alpha03 中包含这些提交内容。
bug 修复
- 修复了生成的代码中存在的导致布局检查器无法读取视图属性的 bug。(Ic7507)
版本 1.0.0-alpha02
2021 年 6 月 2 日
发布了 androidx.resourceinspection:resourceinspection-annotation:1.0.0-alpha02
和 androidx.resourceinspection:resourceinspection-processor:1.0.0-alpha02
。版本 1.0.0-alpha02 中包含这些提交内容。
API 变更
版本 1.0.0-alpha01
2021 年 3 月 24 日
发布了 androidx.resourceinspection:resourceinspection-annotation:1.0.0-alpha01
和 androidx.resourceinspection:resourceinspection-processor:1.0.0-alpha01
。版本 1.0.0-alpha01 中包含这些提交内容。
新功能
借助资源检查库,库开发者可以便捷地在 Android Studio 的实时布局检查器中显示自定义视图的属性。此初始版本为 1.0.0-alpha01
。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Resource Inspection\n\nResourceInspection\n==================\n\nAPI Reference \n[androidx.resourceinspection.annotation](/reference/kotlin/androidx/resourceinspection/annotation/package-summary) \nSurface the attributes of custom views in Android Studio's Live Layout Inspector. \n\n| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |\n|------------------|--------------------------------------------------------------|-------------------|--------------|---------------|\n| January 26, 2022 | [1.0.1](/jetpack/androidx/releases/resourceinspection#1.0.1) | - | - | - |\n\nDeclaring dependencies\n----------------------\n\nTo add a dependency on ResourceInspection, you must add the Google Maven repository to your\nproject. Read [Google's Maven repository](/studio/build/dependencies#google-maven)\nfor more information.\n\nAdd the dependencies for the artifacts you need in the `build.gradle` file for\nyour app or module: \n\n### Groovy\n\n```groovy\ndependencies {\n implementation \"androidx.resourceinspection:resourceinspection-annotation:1.0.1\"\n}\n```\n\n### Kotlin\n\n```kotlin\ndependencies {\n implementation(\"androidx.resourceinspection:resourceinspection-annotation:1.0.1\")\n}\n```\n\nFor more information about dependencies, see [Add build dependencies](/studio/build/dependencies).\n\nFeedback\n--------\n\nYour feedback helps make Jetpack better. Let us know if you discover new issues or have\nideas for improving this library. Please take a look at the\n[existing issues](https://issuetracker.google.com/issues?q=componentid:1033483%20status:open)\nin this library before you create a new one. You can add your vote to an existing issue by\nclicking the star button.\n\n[Create a new issue](https://issuetracker.google.com/issues/new?component=1033483&template=1565569)\n\nSee the [Issue Tracker documentation](https://developers.google.com/issue-tracker)\nfor more information.\n\nVersion 1.0\n-----------\n\n### Version 1.0.1\n\nJanuary 26, 2022\n\n`androidx.resourceinspection:resourceinspection-annotation:1.0.1` and `androidx.resourceinspection:resourceinspection-processor:1.0.1` are released. [Version 1.0.1 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/255d9759ff9495ea552d71b415bf638a02046780..8ae940536431022e180d2b13f8981184dc60fa74/resourceinspection)\n\n**Bug Fixes**\n\n- Added package documentation\n\n### Version 1.0.0\n\nNovember 3, 2021\n\n`androidx.resourceinspection:resourceinspection-annotation:1.0.0` and `androidx.resourceinspection:resourceinspection-processor:1.0.0` are released. [Version 1.0.0 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/c38bf8cba2f6d60f9cceb03adcb56ff57f793b27..255d9759ff9495ea552d71b415bf638a02046780/resourceinspection)\n\n**Major features of 1.0.0**\n\n- The ResourceInspection library provides an annotation processor for library developers to surface the attributes of custom views in Android Studio's [Live Layout Inspector](/studio/debug/layout-inspector#4-0-0-live-layout-inspector).\n\n### Version 1.0.0-rc01\n\nOctober 27, 2021\n\n`androidx.resourceinspection:resourceinspection-annotation:1.0.0-rc01` and `androidx.resourceinspection:resourceinspection-processor:1.0.0-rc01` are released. [Version 1.0.0-rc01 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/1a3dcfb231517d6104969f17063fcc6c97ba6eeb..c38bf8cba2f6d60f9cceb03adcb56ff57f793b27/resourceinspection)\n\n- No changes since 1.0.0-beta01\n\n### Version 1.0.0-beta01\n\nSeptember 15, 2021\n\n`androidx.resourceinspection:resourceinspection-annotation:1.0.0-beta01` and `androidx.resourceinspection:resourceinspection-processor:1.0.0-beta01` are released. [Version 1.0.0-beta01 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/19ae3a88ff0824d615355b492cb56049e16991f2..1a3dcfb231517d6104969f17063fcc6c97ba6eeb/resourceinspection)\n\n**Bug Fixes**\n\n- Fixed crash on non-existent attributes ([I87df0](https://android-review.googlesource.com/#/q/I87df0c0c68f04b32274eaedd65b5a7ab3c56b562))\n- Fixed crash when compiling against an older SDK ([Ie8a1e](https://android-review.googlesource.com/#/q/Ie8a1eafcae62aa98330fc7af89474a32c61faafc))\n- Added validation for int enums and flags ([Ic7ecf](https://android-review.googlesource.com/#/q/Ic7ecf3386c04d133f74b858953d747cacfecfc5a))\n\n### Version 1.0.0-alpha03\n\nJune 30, 2021\n\n`androidx.resourceinspection:resourceinspection-annotation:1.0.0-alpha03` and `androidx.resourceinspection:resourceinspection-processor:1.0.0-alpha03` are released. [Version 1.0.0-alpha03 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/86ff5b4bb956431ec884586ce0aea0127e189ec4..19ae3a88ff0824d615355b492cb56049e16991f2/resourceinspection)\n\n**Bug Fixes**\n\n- Fix a bug in generated code that prevented the Layout Inspector from reading view attributes. ([Ic7507](https://android-review.googlesource.com/#/q/Ic75075f21dafdf5cd12b714eff3a42e0fab17bbc))\n\n### Version 1.0.0-alpha02\n\nJune 2, 2021\n\n`androidx.resourceinspection:resourceinspection-annotation:1.0.0-alpha02` and `androidx.resourceinspection:resourceinspection-processor:1.0.0-alpha02` are released. [Version 1.0.0-alpha02 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/5c42896eb6591b09e3952030fb7ea8d9b8c42713..86ff5b4bb956431ec884586ce0aea0127e189ec4/resourceinspection)\n\n**API Changes**\n\n- Improved AppCompat support ([I2d738](https://android-review.googlesource.com/#/q/I2d7387a017585bcea14a8d8a857b9b60930bc1c5), [b/188446121](https://issuetracker.google.com/issues/188446121))\n\n### Version 1.0.0-alpha01\n\nMarch 24, 2021\n\n`androidx.resourceinspection:resourceinspection-annotation:1.0.0-alpha01` and `androidx.resourceinspection:resourceinspection-processor:1.0.0-alpha01` are released. [Version 1.0.0-alpha01 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/5c42896eb6591b09e3952030fb7ea8d9b8c42713/resourceinspection)\n\n**New Features**\n\nThe Resource Inspection library provides a convenient way for library developers to surface the attributes of custom views in Android Studio's [Live Layout Inspector](/studio/debug/layout-inspector#4-0-0-live-layout-inspector). This initial release is `1.0.0-alpha01`."]]