Stay organized with collections
Save and categorize content based on your preferences.
AndroidResources
interface AndroidResources
Known direct subclasses
AaptOptions |
This interface is deprecated. Renamed to AndroidResources
|
DSL object for configuring aapt options.
Summary
Public functions |
@Incubating Unit |
Adds additional parameters to be passed to aapt .
|
@Incubating Unit |
Adds additional parameters to be passed to aapt .
|
@Incubating Unit |
Adds extensions of files that will not be stored compressed in the APK.
|
@Incubating Unit |
Adds extensions of files that will not be stored compressed in the APK.
|
Public properties |
MutableList<String> |
List of additional parameters to pass to aapt .
|
Boolean |
Forces aapt to return an error if it fails to find an entry for a configuration.
|
String? |
Pattern describing assets to be ignored.
|
Boolean |
Indicates whether the resources in this sub-project are fully namespaced.
|
MutableCollection<String> |
Extensions of files that will not be stored compressed in the APK.
|
Public functions
noCompress
@Incubating
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
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
Public properties
failOnMissingConfigEntry
val failOnMissingConfigEntry: Boolean
Forces aapt to return an error if it fails to find an entry for a configuration.
See aapt --help
namespaced
val 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
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\n```\ninterface AndroidResources\n```\n\n\u003cbr /\u003e\n\nKnown direct subclasses \n[AaptOptions](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AaptOptions) \n\n|--------------------------------------------------------------------------------------|---------------------------------------------------------------|\n| [AaptOptions](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AaptOptions) | **This interface is deprecated.** Renamed to AndroidResources |\n\n*** ** * ** ***\n\nDSL object for configuring aapt options.\n\nSummary\n-------\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [additionalParameters](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidResources#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| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [additionalParameters](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidResources#additionalParameters(kotlin.Array))`(vararg params: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?)` Adds additional parameters to be passed to `aapt`. |\n| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [noCompress](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidResources#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| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [noCompress](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidResources#noCompress(kotlin.Array))`(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| ### Public properties ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [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](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidResources#additionalParameters()) List of additional parameters to pass to `aapt`. |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [failOnMissingConfigEntry](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidResources#failOnMissingConfigEntry()) Forces aapt to return an error if it fails to find an entry for a configuration. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | [ignoreAssetsPattern](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidResources#ignoreAssetsPattern()) Pattern describing assets to be ignored. |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [namespaced](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidResources#namespaced()) Indicates whether the resources in this sub-project are fully namespaced. |\n| [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](/reference/tools/gradle-api/7.2/com/android/build/api/dsl/AndroidResources#noCompress()) Extensions of files that will not be stored compressed in the APK. |\n\nPublic functions\n----------------\n\n### additionalParameters\n\n```\n@Incubating\nfun additionalParameters(params: String?): Unit\n```\n\nAdds additional parameters to be passed to `aapt`. \n\n### additionalParameters\n\n```\n@Incubating\nfun additionalParameters(vararg params: String?): Unit\n```\n\nAdds additional parameters to be passed to `aapt`. \n\n### noCompress\n\n```\n@Incubating\nfun 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\nfun 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\nPublic properties\n-----------------\n\n### additionalParameters\n\n```\nval additionalParameters: MutableList\u003cString\u003e\n```\n\nList of additional parameters to pass to `aapt`. \n\n### failOnMissingConfigEntry\n\n```\nval 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```\nval ignoreAssetsPattern: String?\n```\n\nPattern describing assets to be ignored.\n\nSee `aapt --help` \n\n### namespaced\n\n```\nval 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```\nval noCompress: MutableCollection\u003cString\u003e\n```\n\nExtensions 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.\n\nEquivalent of the -0 flag. See `aapt --help`"]]