Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FormatException on latest flutter configuration files #313

Closed
wants to merge 1 commit into from

Conversation

marcobazzani
Copy link

Fixing this error on new flutter configs

  ════════════════════════════════════════════
     FLUTTER LAUNCHER ICONS (v0.9.1)
  ════════════════════════════════════════════


✓ 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/marcobazzani/Projects/flutter_launcher_icons/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)

Fixing this error on new flutter configs 
```
  ════════════════════════════════════════════
     FLUTTER LAUNCHER ICONS (v0.9.1)
  ════════════════════════════════════════════


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

^

#0      int._handleFormatError (dart:core-patch/integers_patch.dart:129:7)
fluttercommunity#1      int.parse (dart:core-patch/integers_patch.dart:55:14)
fluttercommunity#2      minSdk (package:flutter_launcher_icons/android.dart:309:18)
fluttercommunity#3      createIconsFromConfig (package:flutter_launcher_icons/main.dart:94:47)
fluttercommunity#4      createIconsFromArguments (package:flutter_launcher_icons/main.dart:60:7)
fluttercommunity#5      main (file:///Users/marcobazzani/Projects/flutter_launcher_icons/bin/main.dart:6:26)
fluttercommunity#6      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
fluttercommunity#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
```
@oravecz-jpmc
Copy link

Is just catching the exception a suitable resolution? Shouldn't an attempt be made to reference the value stored at flutter.minSdkVersion?

@marcobazzani
Copy link
Author

@oravecz-jpmc you are right but I don't know where to get it and there was already a logic "assume the worst" so I continued into that path.

The real question here is why the sdk version is needed for a library that shoud just convert image formats. I don't get it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants