Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flutter_launcher_icons not working Unhandled exception: FormatException: Invalid number (at character 1)

I want to change my app icon in flutter using flutter_launcher_icons: ^0.9.2
It shows me errors while I'm running Command flutter pub run flutter_launcher_icons:main
Image of the error


I tried many times but no new results

like image 835
Yassin Elshaiatany Avatar asked Sep 02 '25 05:09

Yassin Elshaiatany


2 Answers

I just had the same problem and solved doing this in android/app/build.gradle.

Changed:

minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion

To:

minSdkVersion 26
targetSdkVersion 30

Source

[Edit] After that, I could not run on emulator, so I changed back the gradle file (without running flutter_launcher_icon again). Now I have the app running and the icons are right.

like image 185
Iagows Avatar answered Sep 04 '25 23:09

Iagows


Thanks to this answer, I was able to fix the issue!

like image 21
Oli Avatar answered Sep 05 '25 01:09

Oli