blob: e92565f3e76e124c6df6d6f81b63c906e178cf73 [file] [log] [blame] [view]
Adam Lesinski0368ebf2016-07-26 12:55:51 -07001# Android Asset Packaging Tool 2.0 (AAPT2) release notes
2
Adam Lesinski28e6c0b2017-05-10 14:56:36 -07003## Version 2.15
4### `aapt2 compile ...`
5- Add `--no-crunch` option to avoid processing PNGs during the compile phase. Note that this
6 shouldn't be used as a performance optimization, as once the PNG is processed, its result is
7 cached for incremental linking. This should only be used if the developer has specially
8 pre-processed the PNG and wants it byte-for-byte identical to the input.
9 NOTE: 9-patches will not be processed correctly with this flag set.
10
Adam Lesinski1e4b0e52017-04-27 15:01:10 -070011## Version 2.14
12### `aapt2 link ...`
13- If an app is building with a minSdkVersion < 26 and a --package-id XX where XX > 7F, aapt2
14 will automatically convert any 'id' resource references from the resource ID 0xPPTTEEEE to
15 0x7FPPEEEE.
16- This is done to workaround a bug in previous versions of the platform that would validate
17 a resource ID by assuming it is larger than 0. In Java, a resource ID with package ID greater
18 than 0x7F is interpreted as a negative number, causing valid feature split IDs like 0x80010000
19 to fail the check.
20- '@id/foo' resources are just sentinel values and do not actually need to resolve to anything.
21 Rewriting these resource IDs to use the package ID 7F while maintaining their definitions under
22 the original package ID is safe. Collisions against the base APK are checked to ensure these
23 rewritten IDs to not overlap with the base.
24
Adam Lesinskid0f492d2017-04-03 18:12:45 -070025## Version 2.13
26### `aapt2 optimize ...`
27- aapt2 optimize can now split a binary APK with the same --split parameters as the link
28 phase.
29
Adam Lesinski33af6c72017-03-29 13:00:35 -070030## Version 2.12
31### `aapt2 optimize ...`
32- aapt2 optimize now understands map (complex) values under the type `id`. It ignores their
33 contents and interprets them as a sentinel `id` type. This was added to support existing
34 apps that build with their `id` types as map values.
35 AAPT and AAPT2 always generate a simple value for the type `ID`, so it is unclear how some
36 these apps are encoded.
37
Adam Lesinski06460ef2017-03-14 18:52:13 -070038## Version 2.11
39### `aapt2 link ...`
40- Adds the ability to specify assets directories with the -A parameter. Assets work just like
41 assets in the original AAPT. It is not recommended to package assets with aapt2, however,
42 since the resulting APK is post-processed by other tools anyways. Assets do not get processed
43 by AAPT2, just copied, so incremental building gets slower if they are included early on.
44
Adam Lesinskif34b6f42017-03-03 16:33:26 -080045## Version 2.10
46### `aapt2 link ...`
47- Add ability to specify package ID to compile with for regular apps (not shared or static libs).
48 This package ID is limited to the range 0x7f-0xff inclusive. Specified with the --package-id
49 flag.
50- Fixed issue with <plurals> resources being stripped for locales and other configuration.
51- Fixed issue with escaping strings in XML resources.
52
Adam Lesinskid48944a2017-02-21 14:22:30 -080053## Version 2.9
54### `aapt2 link ...`
55- Added sparse resource type encoding, which encodes resource entries that are sparse with
56 a binary search tree representation. Only available when minSdkVersion >= API O or resource
57 qualifier of resource types is >= v26 (or whatever API level O becomes). Enabled with
58 `--enable-sparse-encoding` flag.
59### `aapt2 optimize ...`
60- Adds an optimization pass that supports:
61 - stripping out any density assets that do not match the `--target-densities` list of
62 densities.
63 - resource deduping when the resources are dominated and identical (already happens during
64 `link` phase but this covers apps built with `aapt`).
65 - new sparse resource type encoding with the `--enable-sparse-encoding` flag if possible
66 (minSdkVersion >= O or resource qualifier >= v26).
67
Adam Lesinskiceb9b2f2017-02-16 12:05:42 -080068## Version 2.8
69### `aapt2 link ...`
70- Adds shared library support. Build a shared library with the `--shared-lib` flag.
71 Build a client of a shared library by simply including it via `-I`.
72
Adam Lesinski75421622017-01-06 15:20:04 -080073## Version 2.7
Adam Lesinskiceb9b2f2017-02-16 12:05:42 -080074### `aapt2 compile ...`
Adam Lesinski75421622017-01-06 15:20:04 -080075- Fixes bug where psuedolocalization auto-translated strings marked 'translateable="false"'.
76
Adam Lesinski86d67df2017-01-31 13:47:27 -080077## Version 2.6
78### `aapt2`
79- Support legacy `configVarying` resource type.
80- Support `<bag>` tag and treat as `<style>` regardless of type.
81- Add `<feature-group>` manifest tag verification.
82- Add `<meta-data>` tag support to `<instrumentation>`.
83
Yuichi Araki4d35cca2017-01-18 20:42:17 +090084## Version 2.5
85### `aapt2 link ...`
86- Transition XML versioning: Adds a new flag `--no-version-transitions` to disable automatic
87 versioning of Transition XML resources.
88
Adam Lesinski5119e512016-12-05 19:48:20 -080089## Version 2.4
90### `aapt2 link ...`
91- Supports `<meta-data>` tags in `<manifest>`.
92
Adam Lesinskic0c36632016-10-19 18:37:53 -070093## Version 2.3
94### `aapt2`
95- Support new `font` resource type.
96
Adam Lesinski5cb05302016-09-06 17:34:06 -070097## Version 2.2
98### `aapt2 compile ...`
99- Added support for inline complex XML resources. See
100 https://developer.android.com/guide/topics/resources/complex-xml-resources.html
Alexandria Cornwall77788eb2016-09-06 15:16:49 -0700101### `aapt link ...`
102- Duplicate resource filtering: removes duplicate resources in dominated configurations
103 that are always identical when selected at runtime. This can be disabled with
104 `--no-resource-deduping`.
Adam Lesinski5cb05302016-09-06 17:34:06 -0700105
Adam Lesinski36c73a52016-08-11 13:39:24 -0700106## Version 2.1
107### `aapt2 link ...`
108- Configuration Split APK support: supports splitting resources that match a set of
109 configurations to a separate APK which can be loaded alongside the base APK on
110 API 21+ devices. This is done using the flag
111 `--split path/to/split.apk:<config1>[,<config2>,...]`.
112- SDK version resource filtering: Resources with an SDK version qualifier that is unreachable
113 at runtime due to the minimum SDK level declared by the AndroidManifest.xml are stripped.
114
Adam Lesinski0368ebf2016-07-26 12:55:51 -0700115## Version 2.0
116### `aapt2 compile ...`
117- Pseudo-localization: generates pseudolocalized versions of default strings when the
118 `--pseudo-localize` option is specified.
119- Legacy mode: treats some class of errors as warnings in order to be more compatible
120 with AAPT when `--legacy` is specified.
121- Compile directory: treats the input file as a directory when `--dir` is
122 specified. This will emit a zip of compiled files, one for each file in the directory.
123 The directory must follow the Android resource directory structure
124 (res/values-[qualifiers]/file.ext).
125
126### `aapt2 link ...`
127- Automatic attribute versioning: adds version qualifiers to resources that use attributes
128 introduced in a later SDK level. This can be disabled with `--no-auto-version`.
129- Min SDK resource filtering: removes resources that can't possibly be selected at runtime due
130 to the application's minimum supported SDK level.