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