Stay organized with collections
Save and categorize content based on your preferences.
AndroidResources
interface AndroidResources
DSL object for configuring aapt options.
Summary
Public methods
|
abstract Unit |
Adds additional parameters to be passed to aapt .
|
abstract Unit |
Adds additional parameters to be passed to aapt .
|
abstract Unit |
Adds extensions of files that will not be stored compressed in the APK.
|
abstract Unit |
Adds extensions of files that will not be stored compressed in the APK.
|
Properties
|
abstract MutableList<String> |
List of additional parameters to pass to aapt .
|
abstract Boolean |
Forces aapt to return an error if it fails to find an entry for a configuration.
|
abstract String? |
Pattern describing assets to be ignored.
|
abstract Boolean |
Indicates whether the resources in this sub-project are fully namespaced.
|
abstract MutableCollection<String> |
Extensions of files that will not be stored compressed in the APK.
|
Public methods
additionalParameters
@Incubating abstract fun additionalParameters(params: String): Unit
Adds additional parameters to be passed to aapt
.
additionalParameters
@Incubating abstract fun additionalParameters(vararg params: String): Unit
Adds additional parameters to be passed to aapt
.
noCompress
@Incubating abstract fun noCompress(noCompress: String): Unit
Adds extensions of files that will not be stored compressed in the APK.
Equivalent of the -0 flag. See aapt --help
noCompress
@Incubating abstract fun noCompress(vararg noCompress: String): Unit
Adds extensions of files that will not be stored compressed in the APK.
Equivalent of the -0 flag. See aapt --help
Properties
additionalParameters
abstract val additionalParameters: MutableList<String>
List of additional parameters to pass to aapt
.
failOnMissingConfigEntry
abstract var failOnMissingConfigEntry: Boolean
Forces aapt to return an error if it fails to find an entry for a configuration.
See aapt --help
ignoreAssetsPattern
abstract var ignoreAssetsPattern: String?
Pattern describing assets to be ignored.
See aapt --help
namespaced
abstract var namespaced: Boolean
Indicates whether the resources in this sub-project are fully namespaced.
This property is incubating and may change in a future release.
noCompress
abstract val noCompress: MutableCollection<String>
Extensions of files that will not be stored compressed in the APK. Adding an empty
extension, i.e., setting noCompress ''
will trivially disable compression
for all files.
Equivalent of the -0 flag. See aapt --help
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 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# AndroidResources\n================\n\n```\ninterface AndroidResources\n```\n\n|-------------------------------------------------|\n| [com.android.build.api.dsl.AndroidResources](#) |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [AaptOptions](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AaptOptions) |--------------------------------------------------------------------------------------|--------| | [AaptOptions](/reference/tools/gradle-api/7.1/com/android/build/api/dsl/AaptOptions) | \u003cbr /\u003e | |\n\nDSL object for configuring aapt options.\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [additionalParameters](#additionalParameters(kotlin.String))`(`params:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Adds additional parameters to be passed to `aapt`. |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [additionalParameters](#additionalParameters(kotlin.String))`(`vararg` `params:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Adds additional parameters to be passed to `aapt`. |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [noCompress](#noCompress(kotlin.String))`(`noCompress:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Adds extensions of files that will not be stored compressed in the APK. |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [noCompress](#noCompress(kotlin.String))`(`vararg` `noCompress:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Adds extensions of files that will not be stored compressed in the APK. |\n\n| ### Properties ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\\\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\\\u003e | [additionalParameters](#additionalParameters:kotlin.collections.MutableList) List of additional parameters to pass to `aapt`. |\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [failOnMissingConfigEntry](#failOnMissingConfigEntry:kotlin.Boolean) Forces aapt to return an error if it fails to find an entry for a configuration. |\n| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | [ignoreAssetsPattern](#ignoreAssetsPattern:kotlin.String) Pattern describing assets to be ignored. |\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [namespaced](#namespaced:kotlin.Boolean) Indicates whether the resources in this sub-project are fully namespaced. |\n| abstract [MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)\\\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)\\\u003e | [noCompress](#noCompress:kotlin.collections.MutableCollection) Extensions of files that will not be stored compressed in the APK. |\n\nPublic methods\n--------------\n\n### additionalParameters\n\n```\n@Incubating abstract fun additionalParameters(params: String): Unit\n```\n\nAdds additional parameters to be passed to `aapt`. \n\n### additionalParameters\n\n```\n@Incubating abstract fun additionalParameters(vararg params: String): Unit\n```\n\nAdds additional parameters to be passed to `aapt`. \n\n### noCompress\n\n```\n@Incubating abstract fun noCompress(noCompress: String): Unit\n```\n\nAdds extensions of files that will not be stored compressed in the APK.\n\nEquivalent of the -0 flag. See `aapt --help` \n\n### noCompress\n\n```\n@Incubating abstract fun noCompress(vararg noCompress: String): Unit\n```\n\nAdds extensions of files that will not be stored compressed in the APK.\n\nEquivalent of the -0 flag. See `aapt --help`\n\nProperties\n----------\n\n### additionalParameters\n\n```\nabstract val additionalParameters: MutableList\u003cString\u003e\n```\n\nList of additional parameters to pass to `aapt`. \n\n### failOnMissingConfigEntry\n\n```\nabstract var failOnMissingConfigEntry: Boolean\n```\n\nForces aapt to return an error if it fails to find an entry for a configuration.\n\nSee `aapt --help` \n\n### ignoreAssetsPattern\n\n```\nabstract var ignoreAssetsPattern: String?\n```\n\nPattern describing assets to be ignored.\n\nSee `aapt --help` \n\n### namespaced\n\n```\nabstract var namespaced: Boolean\n```\n\nIndicates whether the resources in this sub-project are fully namespaced.\n\nThis property is incubating and may change in a future release. \n\n### noCompress\n\n```\nabstract val noCompress: MutableCollection\u003cString\u003e\n```\n\nExtensions of files that will not be stored compressed in the APK. Adding an empty\nextension, i.e., setting `noCompress ''` will trivially disable compression\nfor all files.\n\nEquivalent of the -0 flag. See `aapt --help`"]]