blob: 2e674bddce7e996d189560d24ba6bc7d6638091e [file] [log] [blame] [view]
Adam Lesinski0368ebf2016-07-26 12:55:51 -07001# Android Asset Packaging Tool 2.0 (AAPT2) release notes
2
Adam Lesinski33af6c72017-03-29 13:00:35 -07003## Version 2.12
4### `aapt2 optimize ...`
5- aapt2 optimize now understands map (complex) values under the type `id`. It ignores their
6 contents and interprets them as a sentinel `id` type. This was added to support existing
7 apps that build with their `id` types as map values.
8 AAPT and AAPT2 always generate a simple value for the type `ID`, so it is unclear how some
9 these apps are encoded.
10
Adam Lesinski06460ef2017-03-14 18:52:13 -070011## Version 2.11
12### `aapt2 link ...`
13- Adds the ability to specify assets directories with the -A parameter. Assets work just like
14 assets in the original AAPT. It is not recommended to package assets with aapt2, however,
15 since the resulting APK is post-processed by other tools anyways. Assets do not get processed
16 by AAPT2, just copied, so incremental building gets slower if they are included early on.
17
Adam Lesinskif34b6f42017-03-03 16:33:26 -080018## Version 2.10
19### `aapt2 link ...`
20- Add ability to specify package ID to compile with for regular apps (not shared or static libs).
21 This package ID is limited to the range 0x7f-0xff inclusive. Specified with the --package-id
22 flag.
23- Fixed issue with <plurals> resources being stripped for locales and other configuration.
24- Fixed issue with escaping strings in XML resources.
25
Adam Lesinskid48944a2017-02-21 14:22:30 -080026## Version 2.9
27### `aapt2 link ...`
28- Added sparse resource type encoding, which encodes resource entries that are sparse with
29 a binary search tree representation. Only available when minSdkVersion >= API O or resource
30 qualifier of resource types is >= v26 (or whatever API level O becomes). Enabled with
31 `--enable-sparse-encoding` flag.
32### `aapt2 optimize ...`
33- Adds an optimization pass that supports:
34 - stripping out any density assets that do not match the `--target-densities` list of
35 densities.
36 - resource deduping when the resources are dominated and identical (already happens during
37 `link` phase but this covers apps built with `aapt`).
38 - new sparse resource type encoding with the `--enable-sparse-encoding` flag if possible
39 (minSdkVersion >= O or resource qualifier >= v26).
40
Adam Lesinskiceb9b2f2017-02-16 12:05:42 -080041## Version 2.8
42### `aapt2 link ...`
43- Adds shared library support. Build a shared library with the `--shared-lib` flag.
44 Build a client of a shared library by simply including it via `-I`.
45
Adam Lesinski75421622017-01-06 15:20:04 -080046## Version 2.7
Adam Lesinskiceb9b2f2017-02-16 12:05:42 -080047### `aapt2 compile ...`
Adam Lesinski75421622017-01-06 15:20:04 -080048- Fixes bug where psuedolocalization auto-translated strings marked 'translateable="false"'.
49
Adam Lesinski86d67df2017-01-31 13:47:27 -080050## Version 2.6
51### `aapt2`
52- Support legacy `configVarying` resource type.
53- Support `<bag>` tag and treat as `<style>` regardless of type.
54- Add `<feature-group>` manifest tag verification.
55- Add `<meta-data>` tag support to `<instrumentation>`.
56
Yuichi Araki4d35cca2017-01-18 20:42:17 +090057## Version 2.5
58### `aapt2 link ...`
59- Transition XML versioning: Adds a new flag `--no-version-transitions` to disable automatic
60 versioning of Transition XML resources.
61
Adam Lesinski5119e512016-12-05 19:48:20 -080062## Version 2.4
63### `aapt2 link ...`
64- Supports `<meta-data>` tags in `<manifest>`.
65
Adam Lesinskic0c36632016-10-19 18:37:53 -070066## Version 2.3
67### `aapt2`
68- Support new `font` resource type.
69
Adam Lesinski5cb05302016-09-06 17:34:06 -070070## Version 2.2
71### `aapt2 compile ...`
72- Added support for inline complex XML resources. See
73 https://developer.android.com/guide/topics/resources/complex-xml-resources.html
Alexandria Cornwall77788eb2016-09-06 15:16:49 -070074### `aapt link ...`
75- Duplicate resource filtering: removes duplicate resources in dominated configurations
76 that are always identical when selected at runtime. This can be disabled with
77 `--no-resource-deduping`.
Adam Lesinski5cb05302016-09-06 17:34:06 -070078
Adam Lesinski36c73a52016-08-11 13:39:24 -070079## Version 2.1
80### `aapt2 link ...`
81- Configuration Split APK support: supports splitting resources that match a set of
82 configurations to a separate APK which can be loaded alongside the base APK on
83 API 21+ devices. This is done using the flag
84 `--split path/to/split.apk:<config1>[,<config2>,...]`.
85- SDK version resource filtering: Resources with an SDK version qualifier that is unreachable
86 at runtime due to the minimum SDK level declared by the AndroidManifest.xml are stripped.
87
Adam Lesinski0368ebf2016-07-26 12:55:51 -070088## Version 2.0
89### `aapt2 compile ...`
90- Pseudo-localization: generates pseudolocalized versions of default strings when the
91 `--pseudo-localize` option is specified.
92- Legacy mode: treats some class of errors as warnings in order to be more compatible
93 with AAPT when `--legacy` is specified.
94- Compile directory: treats the input file as a directory when `--dir` is
95 specified. This will emit a zip of compiled files, one for each file in the directory.
96 The directory must follow the Android resource directory structure
97 (res/values-[qualifiers]/file.ext).
98
99### `aapt2 link ...`
100- Automatic attribute versioning: adds version qualifiers to resources that use attributes
101 introduced in a later SDK level. This can be disabled with `--no-auto-version`.
102- Min SDK resource filtering: removes resources that can't possibly be selected at runtime due
103 to the application's minimum supported SDK level.