blob: 49cb8d4ca8271433a45af1fe450f40ce30aef4ea [file] [log] [blame] [view]
Adam Lesinski0368ebf2016-07-26 12:55:51 -07001# Android Asset Packaging Tool 2.0 (AAPT2) release notes
2
Adam Lesinski2354b562017-05-26 16:31:38 -07003## Version 2.17
Adam Lesinski48a76592017-06-08 11:10:18 -07004### `aapt2 ...`
5- Fixed issue where symlinks would not be followed when compiling PNGs. (bug 62144459)
Adam Lesinski4488f1c2017-05-26 17:33:38 -07006- Fixed issue where overlays that declared `<add-resource>` did not compile. (bug 38355988)
Adam Lesinski48a76592017-06-08 11:10:18 -07007- Fixed issue where `%n` in a string resource was interpreted as a format argument. (bug 37132275)
8- Allow empty resources to compile, giving them a value of `""` or `@null`, depending on the
9 accepted formats. (bug 38425050)
10- Resources declared via `<item>` with no format attribute were changed to accept all
11 resource types. (bug 62260121)
12- Allow `<layout>` element under `<activity>` in AndroidManifest.xml. (bug 62189611)
13- Fix issue where `--no-version-vector` did not apply to `pathInterpolator` and `objectAnimator`.
14 (bug 62211148)
15- Fix issue where overlaid `<style>` would not be merged, and would replace the original resource
16 instead. This fix brings behavior in-line with AAPT. (bug 38355988)
Adam Lesinski2354b562017-05-26 16:31:38 -070017
Adam Lesinskic744ae82017-05-17 19:28:38 -070018## Version 2.16
19### `aapt2 link ...`
20- Versioning of XML files is more intelligent, using a small set of rules to degrade
21 specific newer attributes to backwards compatible versions of them.
22 Ex: `android:paddingHorizontal` degrades to `android:paddingLeft` and `android:paddingRight`.
23
Adam Lesinski28e6c0b2017-05-10 14:56:36 -070024## Version 2.15
25### `aapt2 compile ...`
26- Add `--no-crunch` option to avoid processing PNGs during the compile phase. Note that this
27 shouldn't be used as a performance optimization, as once the PNG is processed, its result is
28 cached for incremental linking. This should only be used if the developer has specially
29 pre-processed the PNG and wants it byte-for-byte identical to the input.
30 NOTE: 9-patches will not be processed correctly with this flag set.
31
Adam Lesinski1e4b0e52017-04-27 15:01:10 -070032## Version 2.14
33### `aapt2 link ...`
34- If an app is building with a minSdkVersion < 26 and a --package-id XX where XX > 7F, aapt2
35 will automatically convert any 'id' resource references from the resource ID 0xPPTTEEEE to
36 0x7FPPEEEE.
37- This is done to workaround a bug in previous versions of the platform that would validate
38 a resource ID by assuming it is larger than 0. In Java, a resource ID with package ID greater
39 than 0x7F is interpreted as a negative number, causing valid feature split IDs like 0x80010000
40 to fail the check.
41- '@id/foo' resources are just sentinel values and do not actually need to resolve to anything.
42 Rewriting these resource IDs to use the package ID 7F while maintaining their definitions under
43 the original package ID is safe. Collisions against the base APK are checked to ensure these
44 rewritten IDs to not overlap with the base.
45
Adam Lesinskid0f492d2017-04-03 18:12:45 -070046## Version 2.13
47### `aapt2 optimize ...`
48- aapt2 optimize can now split a binary APK with the same --split parameters as the link
49 phase.
50
Adam Lesinski33af6c72017-03-29 13:00:35 -070051## Version 2.12
52### `aapt2 optimize ...`
53- aapt2 optimize now understands map (complex) values under the type `id`. It ignores their
54 contents and interprets them as a sentinel `id` type. This was added to support existing
55 apps that build with their `id` types as map values.
56 AAPT and AAPT2 always generate a simple value for the type `ID`, so it is unclear how some
57 these apps are encoded.
58
Adam Lesinski06460ef2017-03-14 18:52:13 -070059## Version 2.11
60### `aapt2 link ...`
61- Adds the ability to specify assets directories with the -A parameter. Assets work just like
62 assets in the original AAPT. It is not recommended to package assets with aapt2, however,
63 since the resulting APK is post-processed by other tools anyways. Assets do not get processed
64 by AAPT2, just copied, so incremental building gets slower if they are included early on.
65
Adam Lesinskif34b6f42017-03-03 16:33:26 -080066## Version 2.10
67### `aapt2 link ...`
68- Add ability to specify package ID to compile with for regular apps (not shared or static libs).
69 This package ID is limited to the range 0x7f-0xff inclusive. Specified with the --package-id
70 flag.
71- Fixed issue with <plurals> resources being stripped for locales and other configuration.
72- Fixed issue with escaping strings in XML resources.
73
Adam Lesinskid48944a2017-02-21 14:22:30 -080074## Version 2.9
75### `aapt2 link ...`
76- Added sparse resource type encoding, which encodes resource entries that are sparse with
77 a binary search tree representation. Only available when minSdkVersion >= API O or resource
78 qualifier of resource types is >= v26 (or whatever API level O becomes). Enabled with
79 `--enable-sparse-encoding` flag.
80### `aapt2 optimize ...`
81- Adds an optimization pass that supports:
82 - stripping out any density assets that do not match the `--target-densities` list of
83 densities.
84 - resource deduping when the resources are dominated and identical (already happens during
85 `link` phase but this covers apps built with `aapt`).
86 - new sparse resource type encoding with the `--enable-sparse-encoding` flag if possible
87 (minSdkVersion >= O or resource qualifier >= v26).
88
Adam Lesinskiceb9b2f2017-02-16 12:05:42 -080089## Version 2.8
90### `aapt2 link ...`
91- Adds shared library support. Build a shared library with the `--shared-lib` flag.
92 Build a client of a shared library by simply including it via `-I`.
93
Adam Lesinski75421622017-01-06 15:20:04 -080094## Version 2.7
Adam Lesinskiceb9b2f2017-02-16 12:05:42 -080095### `aapt2 compile ...`
Adam Lesinski75421622017-01-06 15:20:04 -080096- Fixes bug where psuedolocalization auto-translated strings marked 'translateable="false"'.
97
Adam Lesinski86d67df2017-01-31 13:47:27 -080098## Version 2.6
99### `aapt2`
100- Support legacy `configVarying` resource type.
101- Support `<bag>` tag and treat as `<style>` regardless of type.
102- Add `<feature-group>` manifest tag verification.
103- Add `<meta-data>` tag support to `<instrumentation>`.
104
Yuichi Araki4d35cca2017-01-18 20:42:17 +0900105## Version 2.5
106### `aapt2 link ...`
107- Transition XML versioning: Adds a new flag `--no-version-transitions` to disable automatic
108 versioning of Transition XML resources.
109
Adam Lesinski5119e512016-12-05 19:48:20 -0800110## Version 2.4
111### `aapt2 link ...`
112- Supports `<meta-data>` tags in `<manifest>`.
113
Adam Lesinskic0c36632016-10-19 18:37:53 -0700114## Version 2.3
115### `aapt2`
116- Support new `font` resource type.
117
Adam Lesinski5cb05302016-09-06 17:34:06 -0700118## Version 2.2
119### `aapt2 compile ...`
120- Added support for inline complex XML resources. See
121 https://developer.android.com/guide/topics/resources/complex-xml-resources.html
Alexandria Cornwall77788eb2016-09-06 15:16:49 -0700122### `aapt link ...`
123- Duplicate resource filtering: removes duplicate resources in dominated configurations
124 that are always identical when selected at runtime. This can be disabled with
125 `--no-resource-deduping`.
Adam Lesinski5cb05302016-09-06 17:34:06 -0700126
Adam Lesinski36c73a52016-08-11 13:39:24 -0700127## Version 2.1
128### `aapt2 link ...`
129- Configuration Split APK support: supports splitting resources that match a set of
130 configurations to a separate APK which can be loaded alongside the base APK on
131 API 21+ devices. This is done using the flag
132 `--split path/to/split.apk:<config1>[,<config2>,...]`.
133- SDK version resource filtering: Resources with an SDK version qualifier that is unreachable
134 at runtime due to the minimum SDK level declared by the AndroidManifest.xml are stripped.
135
Adam Lesinski0368ebf2016-07-26 12:55:51 -0700136## Version 2.0
137### `aapt2 compile ...`
138- Pseudo-localization: generates pseudolocalized versions of default strings when the
139 `--pseudo-localize` option is specified.
140- Legacy mode: treats some class of errors as warnings in order to be more compatible
141 with AAPT when `--legacy` is specified.
142- Compile directory: treats the input file as a directory when `--dir` is
143 specified. This will emit a zip of compiled files, one for each file in the directory.
144 The directory must follow the Android resource directory structure
145 (res/values-[qualifiers]/file.ext).
146
147### `aapt2 link ...`
148- Automatic attribute versioning: adds version qualifiers to resources that use attributes
149 introduced in a later SDK level. This can be disabled with `--no-auto-version`.
150- Min SDK resource filtering: removes resources that can't possibly be selected at runtime due
151 to the application's minimum supported SDK level.