This table lists all the artifacts in the androidx.annotation group.
To add a dependency on Annotation, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle file for
your app or module:
dependencies { implementation "androidx.annotation:annotation:1.10.0" // To use the Java-compatible @androidx.annotation.OptIn API annotation implementation "androidx.annotation:annotation-experimental:1.6.0" }
dependencies { implementation("androidx.annotation:annotation:1.10.0") // To use the Java-compatible @androidx.annotation.OptIn API annotation implementation("androidx.annotation:annotation-experimental:1.6.0") }
For more information about dependencies, see Add build dependencies.
Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.
See the Issue Tracker documentation for more information.
April 08, 2026
androidx.annotation:annotation-*:1.10.0 is released. Version 1.10.0 contains these commits.
Important changes since 1.9.0:
@RequiresFlag annotation to flag usages of not yet stable Android platform APIsMarch 25, 2026
androidx.annotation:annotation-*:1.10.0-rc01 is released. Version 1.10.0-rc01 contains these commits.
March 11, 2026
androidx.annotation:annotation-*:1.10.0-alpha01 is released. Version 1.10.0-alpha01 contains these commits.
New Features
API Changes
RequiresFlag annotation for code that must be gated on pre-release flag checks (I77bba, b/479114442)ANNOTATION_TYPE target to RequiresApi and RequiresExtension (I0cb0d)@Discouraged retention policy. (Id2f85, b/375937557)October 30, 2024
androidx.annotation:annotation-*:1.9.1 is released. Version 1.9.1 contains these commits.
Bug Fixes
October 16, 2024
androidx.annotation:annotation-*:1.9.0 is released. Version 1.9.0 contains these commits.
Important changes since 1.8.0
watchosDeviceArm64, mingwX64, linuxArm64.October 2, 2024
androidx.annotation:annotation-*:1.9.0-rc01 is released. Version 1.9.0-rc01 contains no changes since the previous beta.
September 18, 2024
androidx.annotation:annotation-*:1.9.0-beta01 is released. Version 1.9.0-beta01 contains these commits.
API Changes
watchosDeviceArm64 platform target (I1cc04, b/364652024)September 4, 2024
androidx.annotation:annotation-*:1.9.0-alpha03 is released. Version 1.9.0-alpha03 contains no changes since the previous alpha.
August 21, 2024
androidx.annotation:annotation-*:1.9.0-alpha02 is released. Version 1.9.0-alpha02 contains these commits.
New Features
mingwX64 platform (I461ca, b/349894318)linuxArm64 kotlin multiplatform target. (I139d3, b/338268719)June 26, 2024
androidx.annotation:annotation-*:1.9.0-alpha01 is released. Version 1.9.0-alpha01 contains these commits.
External Contribution
linuxArm64 multiplatform target (thanks to Jake Wharton!)August 7, 2024
androidx.annotation:annotation-*:1.8.2 is released. Version 1.8.2 contains these commits.
Bug Fixes
mingwX64 platform (I461ca, b/349894318)July 24, 2024
androidx.annotation:annotation-*:1.8.1 is released. Version 1.8.1 contains these commits.
Bug Fixes
watchos, tvos.May 14, 2024
androidx.annotation:annotation-*:1.8.0 is released. Version 1.8.0 contains these commits.
Important changes since 1.7.0
@ReplaceWith annotation to express replacements for deprecated APIs@MainThread annotation has been moved to the common source set.May 1, 2024
androidx.annotation:annotation-*:1.8.0-rc01 is released. Version 1.8.0-rc01 contains no changes since the prior beta release.
April 17, 2024
androidx.annotation:annotation-*:1.8.0-beta02 is released. Version 1.8.0-beta02 contains no changes since the prior release.
April 3, 2024
androidx.annotation:annotation-*:1.8.0-beta01 is released. Version 1.8.0-beta01 contains these commits.
New Features
ReplaceWith annotation is now API-stable, but the associated lint check with auto-fix has not shipped yetMarch 20, 2024
androidx.annotation:annotation-*:1.8.0-alpha02 is released with no notable changes. Version 1.8.0-alpha02 contains these commits.
February 21, 2024
androidx.annotation:annotation-*:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits.
API Changes
@ReplaceWith annotation to express replacements for deprecated APIs. (I38db3, b/322373864)External Contributions
@MainThread annotation to the common source set. (6f228c)December 13, 2023
androidx.annotation:annotation-*:1.7.1 is released. Version 1.7.1 contains these commits.
Bug Fixes
compile scope when inserting default platform dependency. (I4958f)September 6, 2023
androidx.annotation:annotation-*:1.7.0 is released. Version 1.7.0 contains these commits.
Important changes since 1.6.0
August 23, 2023
androidx.annotation:annotation-*:1.7.0-rc01 is released. Version 1.7.0-rc01 contains these commits.
This release does not contain any changes from the prior beta.
August 9, 2023
androidx.annotation:annotation-*:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits.
New Features
July 26, 2023
androidx.annotation:annotation-*:1.7.0-alpha03 is released. Version 1.7.0-alpha03 contains these commits.
Bug Fixes
March 24, 2023
androidx.annotation:annotation-*:1.7.0-alpha02 is released.
Bug Fixes
March 22, 2023
androidx.annotation:annotation-*:1.7.0-alpha01 is released. Version 1.7.0-alpha01 contains these commits.
New Features
April 08, 2026
androidx.annotation:annotation-experimental:1.6.0 is released. Version 1.6.0 contains these commits.
Important changes since 1.5.0:
February 22, 2023
androidx.annotation:annotation:1.6.0 and androidx.annotation:annotation-jvm:1.6.0 are released. Version 1.6.0 contains these commits.
Important changes since 1.5.0
@RequiresExtension annotation to express that an API requires a particular version of a particular extension SDK (I5e4fe)February 8, 2023
androidx.annotation:annotation:1.6.0-rc01 and androidx.annotation:annotation-jvm:1.6.0-rc01 are released. Version 1.6.0-rc01 contains these commits.
January 25, 2023
androidx.annotation:annotation:1.6.0-beta01 and androidx.annotation:annotation-jvm:1.6.0-beta01 are released with no changes from 1.6.0-alpha01.
January 11, 2023
androidx.annotation:annotation-*:1.6.0-alpha01 is released. Version 1.6.0-alpha01 contains these commits.
February 8, 2023
androidx.annotation:annotation-*:1.6.0-dev01 is released. Version 1.6.0-dev01 contains these commits.
New Features
@RequiresExtension annotation to express that an API requires a particular version of a particular extension SDK. (I5e4fe)September 21, 2022
androidx.annotation:annotation:1.5.0 is released. Version 1.5.0 contains these commits.
Important changes since 1.4.0
September 7, 2022
androidx.annotation:annotation:1.5.0-rc01 is released. Version 1.5.0-rc01 contains these commits.
August 24, 2022
androidx.annotation:annotation:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.
August 10, 2022
androidx.annotation:annotation:1.5.0-alpha02 is released. Version 1.5.0-alpha02 contains these commits.
July 27, 2022
androidx.annotation:annotation:1.5.0-alpha01 is released. Version 1.5.0-alpha01 contains these commits.
New Features
June 15, 2022
androidx.annotation:annotation:1.4.0 is released. Version 1.4.0 contains these commits.
Important changes since 1.3.0
@RestrictTo has been migrated to Kotlin sources and now supports @file usage site. As a result, the Annotation library now depends on the Kotlin standard library.@ReturnThis (b/140249763): Ensures that overriding methods of this method must return the same instance (intended for builders etc)@OpenForTesting (b/141539024): Kotlin classes and methods marked "open" can be annotated with this annotation, and lint will make sure that this class is only subclassed (and methods only overridden) from unit tests@DeprecatedSinceApi (b/37116481): Indicates that the annotated method (or class or field) is part of a backport library for a platform API, which is no longer needed as of the given API level.@EmptySuper: Indicates that this method is defined to be empty, so when overriding you do not need to call it (and in fact you shouldn't; for example, it can contain backwards compatibility checking.)June 1, 2022
androidx.annotation:annotation:1.4.0-rc01 is released. Version 1.4.0-rc01 contains these commits.
May 18, 2022
androidx.annotation:annotation:1.4.0-beta01 is released. Version 1.4.0-beta01 contains these commits.
February 9, 2022
androidx.annotation:annotation:1.4.0-alpha02 is released. Version 1.4.0-alpha02 contains these commits.
New Features
Added @ReturnThis, @OpenForTesting, @EmptySuper and @DeprecatedSinceApi annotations. (21946a2)
@ReturnThis (b/140249763): Ensures that overriding methods of this method must return the same instance (intended for builders etc)
@OpenForTesting (b/141539024): Kotlin classes and methods marked "open" can be annotated with this annotation, and lint will make sure that this class is only subclassed (and methods only overridden) from unit tests
@DeprecatedSinceApi (b/37116481): Indicates that the annotated method (or class or field) is part of a backport library for a platform API, which is no longer needed as of the given API level.
@EmptySuper: Indicates that this method is defined to be empty, so when overriding you do not need to call it (and in fact you shouldn't; for example, it can contain backwards compatibility checking.)
December 15, 2021
androidx.annotation:annotation:1.4.0-alpha01 is released. Version 1.4.0-alpha01 contains these commits.
API Changes
RestrictTo annotation to Kotlin sources (Ia6336)November 3, 2021
androidx.annotation:annotation:1.3.0 is released. Version 1.3.0 contains these commits.
Important changes since 1.2.0
@Discouraged annotation for marking APIs that cannot be reasonably deprecated but have significant negative performance impact and should not be called in normal production code@Context annotation to mark generic Contexts so that developers can migrate to new APIs more easily@GravityInt annotation for marking elements containing gravity values packed into integers@InspectableProperty in favor of @Attribute for androidx.resourceinspectionOctober 27, 2021
androidx.annotation:annotation:1.3.0-rc01 is released. Version 1.3.0-rc01 contains these commits.
September 29, 2021
androidx.annotation:annotation:1.3.0-beta01 is released. Version 1.3.0-beta01 contains these commits.
API Changes
Bug Fixes
March 24, 2021
androidx.annotation:annotation:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.
API Changes
@InspectableProperty in favor of @Attribute
in androidx.resourceinspection. (Ic0eff)@GravityInt annotation for marking elements containing
gravity values packed into integers. (Ifcaa4, b/180620048)February 11, 2026
androidx.annotation:annotation-experimental:1.6.0-rc01 is released. Version 1.6.0-rc01 contains no changes since the prior beta release.
October 22, 2025
androidx.annotation:annotation-experimental:1.6.0-alpha01 is released. Version 1.6.0-alpha01 contains these commits.
API Changes
OptIn annotation now supports the ElementType.PARAMETER target.July 16, 2025
androidx.annotation:annotation-experimental:1.5.1 is released. Version 1.5.1 contains these commits.
May 7, 2025
androidx.annotation:annotation-experimental:1.5.0 is released. Version 1.5.0 contains these commits.
Important changes since 1.4.0
message to RequiresOptIn to match the Kotlin stdlib annotation with default empty string value. (I1f50e)April 23, 2025
androidx.annotation:annotation-experimental:1.5.0-rc01 is released. Version 1.5.0-rc01 contains no changes since the previous beta release, see commits.
April 9, 2025
androidx.annotation:annotation-experimental:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.
Important changes
August 21, 2024
androidx.annotation:annotation-experimental:1.5.0-alpha01 is released. Version 1.5.0-alpha01 contains these commits.
API Changes
message to RequiresOptIn to match the Kotlin stdlib annotation with default empty string value. (I1f50e)April 3, 2024
androidx.annotation:annotation-experimental:1.4.1 is released. Version 1.4.1 contains these commits.
Bug Fixes
isKotlin to avoid accidentally triggering RequiresOptIn check in Kotlin files. (I2d8c1f)January 24, 2024
androidx.annotation:annotation-experimental:1.4.0 is released. Version 1.4.0 contains these commits.
Important changes since 1.3.0
January 10, 2024
androidx.annotation:annotation-experimental:1.4.0-rc01 is released. Version 1.4.0-rc01 contains no changes since the previous release.
December 13, 2023
androidx.annotation:annotation-experimental:1.4.0-beta01 is released. There are no changes since the previous release.
November 29, 2023
androidx.annotation:annotation-experimental:1.4.0-alpha01 is released. Version 1.4.0-alpha01 contains these commits.
Bug Fixes
February 8, 2023
androidx.annotation:annotation-experimental:1.4.0-dev01 is released. Version 1.4.0-dev01 contains these commits.
June 21, 2023
androidx.annotation:annotation-experimental:1.3.1 is released. Version 1.3.1 contains these commits.
Bug Fixes
androidx.annotation.RequiresOptIn in Kotlin sources (b/241097743)September 7, 2022
androidx.annotation:annotation-experimental:1.3.0 is released. Version 1.3.0 contains these commits.
Important changes since 1.2.0
@androidx.annotation.OptIn (I24d58)August 24, 2022
androidx.annotation:annotation-experimental:1.3.0-rc01 is released. Version 1.3.0-rc01 contains these commits.
August 10, 2022
androidx.annotation:annotation-experimental:1.3.0-beta01 is released. Version 1.3.0-beta01 contains these commits.
July 27, 2022
androidx.annotation:annotation-experimental:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.
API Changes
@androidx.annotation.OptIn (I24d58)December 15, 2021
androidx.annotation:annotation-experimental:1.2.0 is released. Version 1.2.0 contains these commits.
Important changes since 1.1.0
This library is now targeting Java 8 language level.
December 1, 2021
androidx.annotation:annotation-experimental:1.2.0-rc01 is released. Version 1.2.0-rc01 contains these commits.
No changes from beta.
November 17, 2021
androidx.annotation:annotation-experimental:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.
API Changes
APIs have been finalized for beta.
June 30, 2021
androidx.annotation:annotation-experimental:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.
New Features
March 24, 2021
androidx.annotation:annotation:1.2.0 is released. Version 1.2.0 contains these commits.
Major changes since 1.1.0
@ChecksSdkIntAtLeast annotation, which can be used to identify methods or fields used to gate access on SDK level and satisfy the NewApi lint check.@DoNotInline annotation, which is paired with a Proguard rule to prevent members from being inlined during optimization.@Documented to ensure they show up in documentation for annotated members.February 24, 2021
androidx.annotation:annotation:1.2.0-rc01 is released. Version 1.2.0-rc01 contains these commits.
January 13, 2021
androidx.annotation:annotation:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.
API Changes
@DoNotInline annotation which instructs code optimizers (e.g. Proguard, R8) to not inline the annotated method. (I3dfe8, b/141326133)May 14, 2020
androidx.annotation:annotation:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.
New Features
@ChecksSdkIntAtLeast annotation. This let’s androidx and users annotate methods and fields that represent an SDK_INT check.
(I89a54, b/120255046)April 7, 2021
androidx.annotation:annotation-experimental:1.1.0 is released. Version 1.1.0 contains these commits.
Major changes since 1.0.0
RequiresOptIn and OptIn annotations have been added for parity with Kotlin, and the Experimental and UsesExperimental annotations have been deprecated.March 24, 2021
androidx.annotation:annotation-experimental:1.1.0-rc02 is released. Version 1.1.0-rc02 contains these commits.
Bug Fixes
March 10, 2021
androidx.annotation:annotation-experimental:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits.
No changes since prior beta release.
January 27, 2021
androidx.annotation:annotation-experimental:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.
API Changes
July 22, 2020
androidx.annotation:annotation-experimental:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits.
New Features
@UseExperimental now supports multiple marker classes (aosp/1185577, b/145137892)November 7, 2019
androidx.annotation:annotation-experimental:1.0.0 and androidx.annotation:annotation-experimental-lint:1.0.0 is released with no changes since 1.0.0-rc01. Version 1.0.0 contains these commits.
Major features of 1.0.0
@Experimental semantics in Java source code@Experimental and @UseExperimental annotations without the need for a dependency on KotlinOctober 23, 2019
androidx.annotation:annotation-experimental:1.0.0-rc01 and androidx.annotation:annotation-experimental-lint:1.0.0-rc01 are released. Version 1.0.0-rc01 contains these commits.
Known issues
When using Studio 3.5 stable, warnings from the @Experimental usage lint detector are not displayed in the IDE for invalid Java usages of Kotlin @Experimental annotation. See b/140640322.
October 9, 2019
androidx.annotation:annotation-experimental:1.0.0-beta01 and androidx.annotation:annotation-experimental-lint:1.0.0-beta01 are released with no changes since version 1.0.0-alpha01. Version 1.0.0-beta01 contains these commits.
September 18, 2019
androidx.annotation:annotation-experimental:1.0.0-alpha01 and androidx.annotation:annotation-experimental-lint:1.0.0-alpha01 are released. These are the commits included in annotation-experimental 1.0.0-alpha01 and these are the commits included in annotation-experimental-lint 1.0.0-alpha01
New features
The Jetpack Experimental annotation library provides a Java-compatible implementation of Kotlin’s experimental API markers. The -lint artifact provides a Lint-based implementation of experimental usage restrictions and enforces restrictions on Java usages of Kotlin’s native experimental API markers.
When using the annotation-experimental artifact as a dependency, the Lint rules provided by the annotation-experimental-lint artifact will be enforced automatically.
June 5, 2019
androidx.annotation:annotation:1.1.0 is released with no changes from 1.1.0-rc01.
May 7, 2019
androidx.annotation:annotation:1.1.0-rc01 is released with no changes from 1.1.0-beta01. The commits included in this version can be found here.
April 3rd, 2019
androidx.annotation:annotation:1.1.0-beta01 is released. The commits included in this version can be found here.
New features
@InspectablePropertyannotation to support the new view inspection APIs added in Android 10. This annotation can be applied to getters on views or other UI elements. Code generation tools may use it to create companion objects that map property names and attribute IDs to property values without the overhead of reflection.API changes
@ContentView has been changed to a constructor annotation and the @LayoutRes value has been removed. Classes wishing to support @ContentView annotations should add this annotation to a constructor that takes a @LayoutRes int parameter. This fixes an issue when using this annotation in library modules. (b/128352521)March 13, 2019
androidx.annotation:annotation:1.1.0-alpha02 is released. The full list of commits included
in this version can be found here.
New features
RestrictTo.Scope.LIBRARY_GROUP_PREFIX. It
restricts usage to code within packages whose groups share the same library
group prefix up to the last . (period). For example, because libraries foo.bar:lib1 and
foo.baz:lib2 share the prefix foo, they can use each other's APIs
that are restricted to this scope. Similarly, for com.foo.bar:lib1 and
com.foo.baz:lib2 share the com.foo. prefix and can share APIs restricted to
that scope. Library com.bar.qux:lib3 however will not be able to use the
restricted API because it only shares the prefix com. and not all the way
until the last . (period).January 30, 2019
androidx.annotation:annotation 1.1.0-alpha01 is released.
New features
@ContentView annotation that allows you to indicate which layout XML file should be inflated. This is supported in ComponentActivity in its 1.0.0-alpha04 and Fragment in its 1.1.0-alpha04 release as an alternative to using setContentView() or overriding onCreateView(), respectively. (aosp/837619)February 25, 2019
androidx.annotation:annotation 1.0.2 is released.
Bug fixes
android.support.annotation types instead of androidx.annotation. Note: This would have only had an impact on your builds if you were not using getDefaultProguardFile as those default rules also included correct rules for both packages. (aosp/891685)getDefaultProguardFile as those default rules also included correct rules for both packages. (aosp/903818)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 2026-04-08 UTC.