Home > database >  Flutter launcher Icons command throws error
Flutter launcher Icons command throws error

Time:04-18

I have the below configuration in my flutter app,

Flutter App config

but i am getting the below error when I try to update the launcher Icon of my application.

 Successfully generated launcher icons
Unhandled exception:
FormatException: Invalid number (at character 1)

^

#0      int._handleFormatError (dart:core-patch/integers_patch.dart:129:7)
#1      int.parse (dart:core-patch/integers_patch.dart:55:14)
#2      minSdk (package:flutter_launcher_icons/android.dart:309:18)
#3      createIconsFromConfig (package:flutter_launcher_icons/main.dart:94:47)
#4      createIconsFromArguments (package:flutter_launcher_icons/main.dart:60:7)
#5      main (file:///Users/aravindganesh/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.9.2/bin/main.dart:6:26)
#6      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)

Please advise how this can be resolved?

CodePudding user response:

Try below code hope its help to you. make some changes in your build.gradle file project_name/android/app/build.gradle

compile SDK

compileSdkVersion 31

min SDK and target SDK

    minSdkVersion 23
    targetSdkVersion 30
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName

then try below command:

flutter pub run flutter_launcher_icons:main
  • Related