From adce84cc686b40b255d230ed8ab57be4fc6af08a Mon Sep 17 00:00:00 2001 From: Shiva Poudel <3774827+shivapoudel@users.noreply.github.com> Date: Wed, 16 Sep 2026 15:33:32 +0545 Subject: [PATCH] fix(android): generate adaptive icon layers at adaptive-icon sizes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit generateAdaptiveIconForeground and generateAdaptiveIconBackground filter AndroidAssetTemplates on AssetKind.Icon, so they emit the legacy launcher sizes (36/48/72/96/144/192) instead of the adaptive-icon sizes (81/108/162/216/324/432) — every layer comes out 0.444x too small. Both generator passes write the same mipmap-*/ic_launcher_foreground.png and ic_launcher_background.png paths, and the undersized pass runs last, so its output wins. Android then upscales the layers 2.25x to fill the 108dp adaptive layer and the launcher icon renders visibly blurry. The `as AndroidOutputAssetTemplateAdaptiveIcon[]` cast on the same expression suppressed the type error that would otherwise have caught this. generateLegacyIcon keeps AssetKind.Icon, which is correct for the pre-API-26 ic_launcher assets. Co-Authored-By: Claude Opus 5 --- src/platforms/android/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/android/index.ts b/src/platforms/android/index.ts index 8d1b7c30..cbe02eff 100644 --- a/src/platforms/android/index.ts +++ b/src/platforms/android/index.ts @@ -325,7 +325,7 @@ export class AndroidAssetGenerator extends AssetGenerator { private async generateAdaptiveIconForeground(asset: InputAsset, project: Project): Promise { const icons = Object.values(AndroidAssetTemplates).filter( - (a) => a.kind === AssetKind.Icon, + (a) => a.kind === AssetKind.AdaptiveIcon, ) as AndroidOutputAssetTemplateAdaptiveIcon[]; const pipe = asset.pipeline(); @@ -397,7 +397,7 @@ export class AndroidAssetGenerator extends AssetGenerator { private async generateAdaptiveIconBackground(asset: InputAsset, project: Project): Promise { const icons = Object.values(AndroidAssetTemplates).filter( - (a) => a.kind === AssetKind.Icon, + (a) => a.kind === AssetKind.AdaptiveIcon, ) as AndroidOutputAssetTemplateAdaptiveIcon[]; const pipe = asset.pipeline();