res 目錄 → New → Image Asset。mipmap-* / drawable-* 所有密度圖標,並更新 AndroidManifest.xml 的 android:icon/android:roundIcon。# 使用 Google 官方工具 icongen (需安裝)
icongen -i source.png -o app/src/main/res -t launcher
# 或使用 Android Asset Studio 網頁版
# https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html
# 上傳圖片 → 下載 ZIP → 解壓覆蓋 res 目錄
早期 ADT 在 Manifest 編輯器的 Application 標籤頁有「Icon」下拉框,點擊可彈出密度選擇器,但無法自動縮放生成,仍需手動放入各密度文件夾。現代 AS 已完全取代該功能。
roundIcon 提供專用圓形圖標,避免系統強制裁剪變形。VectorDrawable (.xml) 替代 PNG,APK 體積更小、任意縮放無損(需 vectorDrawables.useSupportLibrary = true)。mipmap-xxxhdpi/ic_launcher.png 即可,其它密度不受影響。