[BUG] Android Adaptive Icons Not Generated
:information_source: Info
Version: e.g. v^0.11.0
:speech_balloon: Description
The adaptive icons are not being generated inside the mipmap folders using a valid adaptive configuration.
:scroll: Pubspec.yaml
flutter_icons:
image_path: "assets/images/launcher_icon_text_only.png"
android: true
adaptive_icon_foreround: "assets/images/launcher_icon_fg.png"
adaptive_icon_background: "assets/images/launcher_icon_bg.png"
min_sdk_android: 16
ios: true
remove_alpha_ios: true
Same for me, do we have any solution to this?
I'm also having the same problem.
any news on this? :(
@Myzel394 Can you please run your command with -v flag and share the log
@RatakondalaArun sure, here's the output:
[myzel394@device locus]$ flutter pub run flutter_launcher_icons -v
[ +7 ms] executing: uname -m
[ +9 ms] Exit code 0 from: uname -m
[ ] x86_64
[ ] executing: [/home/myzel394/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +3 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
[ ] executing: [/home/myzel394/snap/flutter/common/flutter/] git tag --points-at 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
[ +12 ms] Exit code 0 from: git tag --points-at 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
[ ] 3.7.8
[ +7 ms] executing: [/home/myzel394/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{upstream}
[ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{upstream}
[ ] origin/stable
[ ] executing: [/home/myzel394/snap/flutter/common/flutter/] git ls-remote --get-url origin
[ +1 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +13 ms] executing: [/home/myzel394/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
[ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] stable
[ +14 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +31 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[ ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[ +80 ms] executing: /home/myzel394/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --color run flutter_launcher_icons -v
════════════════════════════════════════════
FLUTTER LAUNCHER ICONS (v0.13.1)
════════════════════════════════════════════
[ 0.002s] Received args [-v]
• Creating default icons Android
• Overwriting the default Android launcher icon with a new icon
• Creating adaptive icons Android
• Updating colors.xml with color for adaptive icon background
• Overwriting default iOS launcher icon with new icon
[ 1.332s] No platform provided
✓ Successfully generated launcher icons
[+1842 ms] "flutter run" took 1,970ms.
[ +132 ms] ensureAnalyticsSent: 128ms
[ ] Running 0 shutdown hooks
[ ] Shutdown hooks complete
[ ] exiting with code 0
Maybe there's also a problem with the icon? If you would like to see it, you can find it here: https://github.com/Myzel394/locus/blob/master/assets/launcher-icon-android.png
Okay I added the icon manually now. Here's what you need to do:
- Read https://developer.android.com/develop/ui/views/launch/icon_design_adaptive, this contains basically everything you need to know about monochrome icons
- Create your icon based on the doc. You need a ratio of 72x72 for your icon and a background size of 108x108.
- Rename your file to
ic_launcher_monochrome - Go to https://www.appicon.co/#image-sets, make sure you are on "Image Sets" and upload your file
- You only need "Android" to be checked
- Download & extract your icons
- Open the extracted folder, then open
android, you should see folders likedrawable-hdpi,drawable-mdpietc. - Copy all folders into your Flutter project under
android/app/src/main/res- theresfolder should already contain the same folders (drawable-hdpi,drawable-mdpietc.), if not, you are probably in the wrong folder - Open
android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml - Add
<monochrome android:drawable="@drawable/ic_launcher_monochrome"/>just before the closing tag of<adaptive-icon>
Your ic_launcher.xml should look something like this:
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
</adaptive-icon>
Best website to generate icons link