
Exposes metadata to help tools and developers understand code, offering common API annotations (including Java-compatible OptIn) and dependency artifacts for easy integration.
Expose metadata that helps tools and other developers understand your app's code.
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.9.1")
// To use the Java-compatible @androidx.annotation.OptIn API annotation
implementation("androidx.annotation:annotation-experimental:1.5.1")
}dependencies {
implementation "androidx.annotation:annotation:1.9.1"
// To use the Java-compatible @androidx.annotation.OptIn API annotation
implementation "androidx.annotation:annotation-experimental:1.5.1"
}For more information about dependencies, see Add build dependencies.
Expose metadata that helps tools and other developers understand your app's code.
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.9.1")
// To use the Java-compatible @androidx.annotation.OptIn API annotation
implementation("androidx.annotation:annotation-experimental:1.5.1")
}dependencies {
implementation "androidx.annotation:annotation:1.9.1"
// To use the Java-compatible @androidx.annotation.OptIn API annotation
implementation "androidx.annotation:annotation-experimental:1.5.1"
}For more information about dependencies, see Add build dependencies.