Android 15 中有关限制非 SDK 接口的更新
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Android 15 包含更新后的受限非 SDK 接口列表(基于与 Android 开发者之间的协作以及最新的内部测试)。在限制使用非 SDK 接口之前,我们会尽可能确保有可用的公开替代方案。
如果您的应用并非以 Android 15 为目标平台,其中一些变更可能不会立即对您产生影响。不过,虽然您的应用可以访问某些非 SDK 接口(具体取决于应用的目标 API 级别),但只要您使用任何非 SDK 方法或字段,终归存在导致应用出问题的显著风险。
如果您不确定自己的应用是否使用了非 SDK 接口,则可以测试该应用,进行确认。如果您的应用依赖于非 SDK 接口,则应该开始计划迁移到 SDK 替代方案。不过,我们知道某些应用具有使用非 SDK 接口的有效用例。如果您无法为应用中的某项功能找到使用非 SDK 接口的替代方案,则应该请求新的公共 API。
如需查看 Android 15 的所有非 SDK 接口的完整列表,请下载以下文件:
文件:hiddenapi-flags.csv
SHA-256 校验和:40134e205e58922a708c453726b279a296e6a1f34a988abd90cec0f3432ea5a9
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-21。
[null,null,["最后更新时间 (UTC):2025-08-21。"],[],[],null,["# Updates to non-SDK interface restrictions in Android 15\n\nAndroid 15 includes updated lists of restricted non-SDK\ninterfaces based on collaboration with Android developers and the latest\ninternal testing. Whenever possible, we make sure that public alternatives are\navailable before we restrict non-SDK interfaces.\n\nIf your app does not target Android 15, some of these changes\nmight not immediately affect you. However, while it's possible for your app to\naccess some non-SDK interfaces\n[depending on your app's target API level](/guide/app-compatibility/restrictions-non-sdk-interfaces#list-names)), using any non-SDK\nmethod or field always carries a high risk of breaking your app.\n\nIf you are unsure if your app uses non-SDK interfaces, you can\n[test your app](/guide/app-compatibility/restrictions-non-sdk-interfaces#test-for-non-sdk) to find out. If your app relies on non-SDK\ninterfaces, you should begin planning a migration to SDK alternatives.\nNevertheless, we understand that some apps have valid use cases for using\nnon-SDK interfaces. If you can't find an alternative to using a non-SDK\ninterface for a feature in your app, you should\n[request a new public API](/guide/app-compatibility/restrictions-non-sdk-interfaces#feature-request).\n\nFor a complete list of all non-SDK interfaces for Android 15, download the\nfollowing file:\n\nFile: [`hiddenapi-flags.csv`](https://dl.google.com/developers/android/vic/non-sdk/hiddenapi-flags.csv)\n\nSHA-256 checksum: `40134e205e58922a708c453726b279a296e6a1f34a988abd90cec0f3432ea5a9`"]]