• Home
Name Date Size #Lines LOC

..--

cmd/04-Jul-2025-10,8698,458

compile/04-Jul-2025-3,2442,405

configuration/04-Jul-2025-2,5241,266

dump/04-Jul-2025-3,1682,556

filter/04-Jul-2025-619308

format/04-Jul-2025-9,1256,856

integration-tests/04-Jul-2025-4,6793,611

io/04-Jul-2025-1,495958

java/04-Jul-2025-3,7672,719

link/04-Jul-2025-8,4126,162

optimize/04-Jul-2025-2,2861,518

process/04-Jul-2025-1,303880

split/04-Jul-2025-624436

test/04-Jul-2025-1,6011,183

text/04-Jul-2025-1,319983

tools/04-Jul-2025-666494

trace/04-Jul-2025-252168

util/04-Jul-2025-1,7711,220

xml/04-Jul-2025-2,3671,620

.clang-formatD04-Jul-2025194 87

Android.bpD04-Jul-20256.7 KiB237228

ApkInfo.protoD04-Jul-20257.8 KiB340288

AppInfo.hD04-Jul-20251.6 KiB5317

Configuration.protoD04-Jul-20255.1 KiB217170

Debug.cppD04-Jul-202532.4 KiB997826

Debug.hD04-Jul-20251.6 KiB5025

Diagnostics.hD04-Jul-20251.7 KiB7042

DominatorTree.cppD04-Jul-20252.9 KiB9662

DominatorTree.hD04-Jul-20253.2 KiB12262

DominatorTree_test.cppD04-Jul-20258.8 KiB230179

LoadedApk.cppD04-Jul-202513.1 KiB362299

LoadedApk.hD04-Jul-20254.2 KiB13073

Main.cppD04-Jul-20256.4 KiB206146

NameMangler.hD04-Jul-20252.9 KiB9947

NameMangler_test.cppD04-Jul-20251.4 KiB4822

OWNERSD04-Jul-202563 54

Resource.cppD04-Jul-20254.9 KiB172140

Resource.hD04-Jul-202515.6 KiB573354

ResourceMetadata.protoD04-Jul-20251.5 KiB5043

ResourceParser.cppD04-Jul-202571.4 KiB1,9011,513

ResourceParser.hD04-Jul-20256.3 KiB15382

ResourceParser_test.cppD04-Jul-202553.3 KiB1,4221,159

ResourceTable.cppD04-Jul-202532.4 KiB860678

ResourceTable.hD04-Jul-202512.9 KiB382236

ResourceTable_test.cppD04-Jul-202516.3 KiB389305

ResourceUtils.cppD04-Jul-202531.8 KiB1,032821

ResourceUtils.hD04-Jul-202511.6 KiB32690

ResourceUtils_test.cppD04-Jul-202513.3 KiB313248

ResourceValues.cppD04-Jul-202533.5 KiB1,210974

ResourceValues.hD04-Jul-202514.6 KiB448279

ResourceValues_test.cppD04-Jul-202511.9 KiB325239

Resource_test.cppD04-Jul-20258 KiB232153

Resources.protoD04-Jul-202519 KiB663533

ResourcesInternal.protoD04-Jul-20252 KiB6147

SdkConstants.cppD04-Jul-20253.5 KiB12083

SdkConstants.hD04-Jul-20251.8 KiB7448

SdkConstants_test.cppD04-Jul-20252 KiB5227

ValueTransformer.cppD04-Jul-20251.8 KiB5128

ValueTransformer.hD04-Jul-20254.2 KiB13161

ValueTransformer_inline.hD04-Jul-20251.6 KiB4824

ValueVisitor.hD04-Jul-20255.9 KiB217160

ValueVisitor_test.cppD04-Jul-20252.5 KiB8850

development.mdD04-Jul-2025715 117

formats.mdD04-Jul-20253.4 KiB4634

readme.mdD04-Jul-20259.4 KiB188165

readme.md

1# Android Asset Packaging Tool 2.0 (AAPT2) release notes
2
3## Version 2.20
4- Too many features, bug fixes, and improvements to list since the last minor version update in
5  2017. This README will be updated more frequently in the future.
6- Added a new flag `--no-compress-fonts`. This can significantly speed up loading fonts from APK
7  assets, at the cost of increasing the storage size of the APK.
8- Changed the behavior of `--enable-sparse-encoding`. Sparse encoding is only applied if the
9  minSdkVersion is >= 32.
10- Changed the behavior of `--force-sparse-encoding`. Sparse encoding is only applied if the
11  minSdkVersion is >= 32 or is not set.
12
13## Version 2.19
14- Added navigation resource type.
15- Fixed issue with resource deduplication. (bug 64397629)
16- Added a daemon mode for issuing commands. This is invoked with `aapt2 daemon`.
17  Command line arguments are separated by newlines, with an empty line signalling the
18  end of a command. Sending `EOF (Ctrl+D)` to the daemon will exit.
19- Fixed an issue where multiple permissions defined in AndroidManifest.xml would generate
20  conflicting definitions for the same Java constant in Manifest.java. Changed the implementation
21  to match that of `aapt`, which will take the last definition as the sole definition.
22  A warning is logged if such a scenario occurs. (bug 64472942)
23- Made improvements to handling of paths on Windows. This should resolve a lot of issues with
24  Unicode paths. (bug 62336414, 63830502)
25
26## Version 2.18
27### `aapt2 ...`
28- Fixed issue where enum values were interpreted as integers and range checked. (bug 62358540)
29- Fixed issue where ints and floats with trailing whitespace would not be parsed. (bug 62902869)
30- Fixed issue where `--custom-package` was not honored when writing Manifest.java. (bug 62826426)
31- Add `<key-sets>` and its nested tags to the allowed set of XML tags in AndroidManifest.xml.
32  (bug 62839863)
33- Fixed issue where Java classes referenced from fragments and menus were not added to
34  the set of Proguard keep rules. (bug 62216174)
35- Fixed issue where escaped unicode characters would generate malformed UTF-8. (bug 62839202)
36- Fixed issue where apostrophes or quotes used in XML attribute values were ignored.
37  (bug 62840406, 62840718)
38
39## Version 2.17
40### `aapt2 ...`
41- Fixed issue where symlinks would not be followed when compiling PNGs. (bug 62144459)
42- Fixed issue where overlays that declared `<add-resource>` did not compile. (bug 38355988)
43- Fixed issue where `%n` in a string resource was interpreted as a format argument. (bug 37132275)
44- Allow empty resources to compile, giving them a value of `""` or `@null`, depending on the
45  accepted formats. (bug 38425050)
46- Resources declared via `<item>` with no format attribute were changed to accept all
47  resource types. (bug 62260121)
48- Allow `<layout>` element under `<activity>` in AndroidManifest.xml. (bug 62189611)
49- Fix issue where `--no-version-vector` did not apply to `pathInterpolator` and `objectAnimator`.
50  (bug 62211148)
51- Fix issue where overlaid `<style>` would not be merged, and would replace the original resource
52  instead. This fix brings behavior in-line with AAPT. (bug 38355988)
53
54## Version 2.16
55### `aapt2 link ...`
56- Versioning of XML files is more intelligent, using a small set of rules to degrade
57  specific newer attributes to backwards compatible versions of them.
58  Ex: `android:paddingHorizontal` degrades to `android:paddingLeft` and `android:paddingRight`.
59
60## Version 2.15
61### `aapt2 compile ...`
62- Add `--no-crunch` option to avoid processing PNGs during the compile phase. Note that this
63  shouldn't be used as a performance optimization, as once the PNG is processed, its result is
64  cached for incremental linking. This should only be used if the developer has specially
65  pre-processed the PNG and wants it byte-for-byte identical to the input.
66  NOTE: 9-patches will not be processed correctly with this flag set.
67
68## Version 2.14
69### `aapt2 link ...`
70- If an app is building with a minSdkVersion < 26 and a --package-id XX where XX > 7F, aapt2
71  will automatically convert any 'id' resource references from the resource ID 0xPPTTEEEE to
72  0x7FPPEEEE.
73- This is done to workaround a bug in previous versions of the platform that would validate
74  a resource ID by assuming it is larger than 0. In Java, a resource ID with package ID greater
75  than 0x7F is interpreted as a negative number, causing valid feature split IDs like 0x80010000
76  to fail the check.
77- '@id/foo' resources are just sentinel values and do not actually need to resolve to anything.
78  Rewriting these resource IDs to use the package ID 7F while maintaining their definitions under
79  the original package ID is safe. Collisions against the base APK are checked to ensure these
80  rewritten IDs to not overlap with the base.
81
82## Version 2.13
83### `aapt2 optimize ...`
84- aapt2 optimize can now split a binary APK with the same --split parameters as the link
85  phase.
86
87## Version 2.12
88### `aapt2 optimize ...`
89- aapt2 optimize now understands map (complex) values under the type `id`. It ignores their
90  contents and interprets them as a sentinel `id` type. This was added to support existing
91  apps that build with their `id` types as map values.
92  AAPT and AAPT2 always generate a simple value for the type `ID`, so it is unclear how some
93  these apps are encoded.
94
95## Version 2.11
96### `aapt2 link ...`
97- Adds the ability to specify assets directories with the -A parameter. Assets work just like
98  assets in the original AAPT. It is not recommended to package assets with aapt2, however,
99  since the resulting APK is post-processed by other tools anyways. Assets do not get processed
100  by AAPT2, just copied, so incremental building gets slower if they are included early on.
101
102## Version 2.10
103### `aapt2 link ...`
104- Add ability to specify package ID to compile with for regular apps (not shared or static libs).
105  This package ID is limited to the range 0x7f-0xff inclusive. Specified with the --package-id
106  flag.
107- Fixed issue with <plurals> resources being stripped for locales and other configuration.
108- Fixed issue with escaping strings in XML resources.
109
110## Version 2.9
111### `aapt2 link ...`
112- Added sparse resource type encoding, which encodes resource entries that are sparse with
113  a binary search tree representation. Only available when minSdkVersion >= API O or resource
114  qualifier of resource types is >= v26 (or whatever API level O becomes). Enabled with
115  `--enable-sparse-encoding` flag.
116### `aapt2 optimize ...`
117- Adds an optimization pass that supports:
118    - stripping out any density assets that do not match the `--target-densities` list of
119      densities.
120    - resource deduping when the resources are dominated and identical (already happens during
121      `link` phase but this covers apps built with `aapt`).
122    - new sparse resource type encoding with the `--enable-sparse-encoding` flag if possible
123      (minSdkVersion >= O or resource qualifier >= v26).
124
125## Version 2.8
126### `aapt2 link ...`
127- Adds shared library support. Build a shared library with the `--shared-lib` flag.
128  Build a client of a shared library by simply including it via `-I`.
129
130## Version 2.7
131### `aapt2 compile ...`
132- Fixes bug where psuedolocalization auto-translated strings marked 'translateable="false"'.
133
134## Version 2.6
135### `aapt2`
136- Support legacy `configVarying` resource type.
137- Support `<bag>` tag and treat as `<style>` regardless of type.
138- Add `<feature-group>` manifest tag verification.
139- Add `<meta-data>` tag support to `<instrumentation>`.
140
141## Version 2.5
142### `aapt2 link ...`
143- Transition XML versioning: Adds a new flag `--no-version-transitions` to disable automatic
144  versioning of Transition XML resources.
145
146## Version 2.4
147### `aapt2 link ...`
148- Supports `<meta-data>` tags in `<manifest>`.
149
150## Version 2.3
151### `aapt2`
152- Support new `font` resource type.
153
154## Version 2.2
155### `aapt2 compile ...`
156- Added support for inline complex XML resources. See
157  https://developer.android.com/guide/topics/resources/complex-xml-resources.html
158### `aapt link ...`
159- Duplicate resource filtering: removes duplicate resources in dominated configurations
160  that are always identical when selected at runtime. This can be disabled with
161  `--no-resource-deduping`.
162
163## Version 2.1
164### `aapt2 link ...`
165- Configuration Split APK support: supports splitting resources that match a set of
166  configurations to a separate APK which can be loaded alongside the base APK on
167  API 21+ devices. This is done using the flag
168  `--split path/to/split.apk:<config1>[,<config2>,...]`.
169- SDK version resource filtering: Resources with an SDK version qualifier that is unreachable
170  at runtime due to the minimum SDK level declared by the AndroidManifest.xml are stripped.
171
172## Version 2.0
173### `aapt2 compile ...`
174- Pseudo-localization: generates pseudolocalized versions of default strings when the
175  `--pseudo-localize` option is specified.
176- Legacy mode: treats some class of errors as warnings in order to be more compatible
177  with AAPT when `--legacy` is specified.
178- Compile directory: treats the input file as a directory when `--dir` is
179  specified. This will emit a zip of compiled files, one for each file in the directory.
180  The directory must follow the Android resource directory structure
181  (res/values-[qualifiers]/file.ext).
182
183### `aapt2 link ...`
184- Automatic attribute versioning: adds version qualifiers to resources that use attributes
185  introduced in a later SDK level. This can be disabled with `--no-auto-version`.
186- Min SDK resource filtering: removes resources that can't possibly be selected at runtime due
187  to the application's minimum supported SDK level.
188