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