Skip to content

fix(dist-apk): link a project's res/ as the base, and pin android-platform 36-r2 - #21

Merged
Sunrisepeak merged 2 commits into
mainfrom
fix/apk-primary-resources-and-api-36
Sep 13, 2026
Merged

fix(dist-apk): link a project's res/ as the base, and pin android-platform 36-r2#21
Sunrisepeak merged 2 commits into
mainfrom
fix/apk-primary-resources-and-api-36

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Two dist-apk defects an application with a launcher icon hits, measured by HuxerUI's Android row against 0.9.0.

options::resources was linked as an aapt2 overlay

aapt2 link -R <unit> is the overlay form: every resource in that unit must override one the base already defines. A project's res/ is the base, so its first colour failed with

error: resource color/ic_launcher_background does not override an existing resource.

and no icon, colour or string could be supplied through the option at all. The compiled unit is now passed positionally (dist/apk.cppm, the link step).

xim:android-platform pinned 35-r2

The index carries 36-r2 since openxlings/xim-pkgindex#834. A project declaring 36 for its own targetSdkVersion got a two-versions warning and the nearer pin won. The option pins 36-r2; the level-0 fixture manifest follows (targetSdkVersion="36" is the one byte in it read from the platform, everything else is the template 0.8.0 rendered — the check script says so).

Tests

tests/apk-consumer gains criterion (g): with APK_CONSUMER_RES set, its own res/values/{strings,colors}.xml (two resources nothing else defines) link, and aapt2 dump resources on the apk lists both. The CI step runs the script as before, now (a) to (g).

Local: check-apk-features.sh (a)–(g) pass with mcpp 2026.9.13.1. End to end: HuxerUI's example 01 with a launcher res/ (the SDK template's mipmaps) packed with this branch as a path dependency carries res/mipmap-*, resources.arsc, and aapt2 dump badging reports application-icon-* and targetSdkVersion:'36', with no two-versions warning.

Version 0.9.1.

…tform 36-r2

Two defects an application with a launcher icon hits, measured by
HuxerUI's Android row against 0.9.0.

`-R` is aapt2's overlay: every resource in that unit must override one the
base already defines. A project's `res/` IS the base, so its first colour
failed with `color/ic_launcher_background does not override an existing
resource`, and no icon, colour or string could be supplied at all. The
compiled unit is now passed positionally.

`xim:android-platform` was pinned at 35-r2 while the index has carried
36-r2 since openxlings/xim-pkgindex#834; a project declaring 36 for its
own targetSdkVersion got a two-versions warning and the nearer pin. The
option pins 36-r2, and the level-0 fixture manifest follows
(`targetSdkVersion="36"` -- the one byte in it that is read from the
platform, everything else is the template 0.8.0 rendered).

`tests/apk-consumer` gains criterion (g): with APK_CONSUMER_RES set, its
own `res/values/{strings,colors}.xml` -- two resources nothing else
defines -- link, and `aapt2 dump resources` on the apk lists both.
check-apk-features.sh (a) to (g) pass locally; HuxerUI's example 01 with
a launcher `res/` packs to an APK carrying `res/mipmap-*`,
`resources.arsc` and `application-icon-*` in its badging.

Version 0.9.1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants