Adds a file extension of Android resources, assets, and Java resources to be stored uncompressed in the APK. Adding an empty extension (i.e., noCompress('')) will disable compression for all Android resources, assets, and Java resources.
Adds file extensions of Android resources, assets, and Java resources to be stored uncompressed in the APK. Adding an empty extension (e.g., noCompress('')) will disable compression for all Android resources, assets, and Java resources.
File extensions of Android resources, assets, and Java resources to be stored uncompressed in the APK. Adding an empty extension (e.g., setting noCompress '') will disable compression for all Android resources, assets, and Java resources.
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/8.0/com/android/build/api/dsl/AaptOptions) \n\n|--------------------------------------------------------------------------------------|---------------------------------------------------------------|\n| [AaptOptions](/reference/tools/gradle-api/8.0/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| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | ~~[additionalParameters](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/AndroidResources#additionalParameters(kotlin.String))~~`(params: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` **This function is deprecated.** Replaced with property additionalParameters |\n| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | ~~[additionalParameters](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/AndroidResources#additionalParameters(kotlin.Array))~~`(vararg params: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` **This function is deprecated.** Replaced with property additionalParameters |\n| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | ~~[noCompress](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/AndroidResources#noCompress(kotlin.String))~~`(noCompress: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` **This function is deprecated.** Replaced with property noCompress |\n| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | ~~[noCompress](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/AndroidResources#noCompress(kotlin.Array))~~`(vararg noCompress: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` **This function is deprecated.** Replaced with property noCompress |\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/8.0/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/8.0/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/8.0/com/android/build/api/dsl/AndroidResources#ignoreAssetsPattern()) Pattern describing assets to be ignored. |\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` | [ignoreAssetsPatterns](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/AndroidResources#ignoreAssetsPatterns()) Patterns describing assets to be ignored. |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [namespaced](/reference/tools/gradle-api/8.0/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/8.0/com/android/build/api/dsl/AndroidResources#noCompress()) File extensions of Android resources, assets, and Java resources to be stored uncompressed in the APK. |\n\nPublic functions\n----------------\n\n### additionalParameters\n\n```\nfun [additionalParameters](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/AndroidResources#additionalParameters(kotlin.String))(params: String): Unit\n```\n| **This function is deprecated.** \n| Replaced with property additionalParameters\n\nAdds additional parameters to be passed to `aapt`. \n\n### additionalParameters\n\n```\nfun [additionalParameters](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/AndroidResources#additionalParameters(kotlin.Array))(vararg params: String): Unit\n```\n| **This function is deprecated.** \n| Replaced with property additionalParameters\n\nAdds additional parameters to be passed to `aapt`. \n\n### noCompress\n\n```\nfun [noCompress](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/AndroidResources#noCompress(kotlin.String))(noCompress: String): Unit\n```\n| **This function is deprecated.** \n| Replaced with property noCompress\n\nAdds a file extension of Android resources, assets, and Java resources to be stored uncompressed in the APK. Adding an empty extension (i.e., `noCompress('')`) will disable compression for all Android resources, assets, and Java resources. \n\n### noCompress\n\n```\nfun [noCompress](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/AndroidResources#noCompress(kotlin.Array))(vararg noCompress: String): Unit\n```\n| **This function is deprecated.** \n| Replaced with property noCompress\n\nAdds file extensions of Android resources, assets, and Java resources to be stored uncompressed in the APK. Adding an empty extension (e.g., `noCompress('')`) will disable compression for all Android resources, assets, and Java resources.\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```\nvar 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```\nvar ignoreAssetsPattern: String?\n```\n\nPattern describing assets to be ignored.\n\nThis is [ignoreAssetsPatterns](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/AndroidResources#ignoreAssetsPatterns()) joined by ':'. \n\n### ignoreAssetsPatterns\n\n```\nval ignoreAssetsPatterns: MutableCollection\u003cString\u003e\n```\n\nPatterns describing assets to be ignored.\n\nIf empty, defaults to `[\"!.svn\", \"!.git\", \"!.ds_store\", \"!*.scc\", \".*\", \"\u003cdir\u003e_*\", \"!CVS\", \"!thumbs.db\", \"!picasa.ini\", \"!*~\"]` \n\n### namespaced\n\n```\nvar 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\nFile extensions of Android resources, assets, and Java resources to be stored uncompressed in the APK. Adding an empty extension (e.g., setting `noCompress ''`) will disable compression for all Android resources, assets, and Java resources."]]