
Reduces memory footprint of small collections with memory-optimized list, map, and set implementations—drop-in replacements minimizing allocations and overhead while preserving familiar collection APIs and behavior.
Reduce the memory impact of existing and new collections that are small.
To add a dependency on Collection, 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 {
val collection_version = "1.5.0"
implementation("androidx.collection:collection:$collection_version")
}
dependencies {
def collection_version = "1.5.0"
implementation "androidx.collection:collection:$collection_version"
}
For more information about dependencies, see Add Build Dependencies.
Reduce the memory impact of existing and new collections that are small.
To add a dependency on Collection, 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 {
val collection_version = "1.5.0"
implementation("androidx.collection:collection:$collection_version")
}
dependencies {
def collection_version = "1.5.0"
implementation "androidx.collection:collection:$collection_version"
}
For more information about dependencies, see Add Build Dependencies.