-
Notifications
You must be signed in to change notification settings - Fork 403
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
[BUG] Getting Unhandled Exception #360
Comments
Hey! I was having this same problem and found the solution. Since recent versions of Flutter the Ex:
It turns out that this package relies on the The solution was to revert to the old approach, without the So, in order to be able to run the REMOVE (not just comment) the block below :
USE NUMBERS as the values for
The number above are the versions I use for my project. Please be free to update them to your desired version. Finally, you can re-run the |
You can also use one of the many fixed forked versions to get around the problem. For example: dev_dependencies:
flutter_launcher_icons:
git:
url: [email protected]:RatakondalaArun/flutter_launcher_icons.git
ref: fix/flutter-v2.8.0-support-321 This checks the |
flutter pub run flutter_launcher_icons:main -f pubspec.yaml ✓ Successfully generated launcher icons ^ #0 int._handleFormatError (dart:core-patch/integers_patch.dart:129:7) can anyone help me I'm also getting same error and i also changed my minsdk 21 tergetsdk 29 but not working |
@theharshguptaflutter this is exactly the problem I was having and for which I described a fix for above. Have you tried using a forked version? |
Should use this forked package instead: https://pub.dev/packages/icons_launcher |
ℹ️ Info
Version: ^0.9.2
💬 Description
Command executed:
flutter pub run flutter_launcher_icons:main
Exception:
flutter pub run flutter_launcher_icons:main
════════════════════════════════════════════
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/admin/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.9.2/bin/main.dart:6:26)
#6 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:295:32)
#7 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
pub finished with exit code 255
📜 Pubspec.yaml
We ask that you include your pubspec.yaml file as a common problem we have seen has been the pubspec.yaml file being incorrect
name: fansinc
description: A new Flutter project.
The following line prevents the package from being accidentally published to
pub.dev using
flutter pub publish
. This is preferred for private packages.publish_to: 'none' # Remove this line if you wish to publish to pub.dev
The following defines the version and build number for your application.
A version number is three numbers separated by dots, like 1.2.43
followed by an optional build number separated by a +.
Both the version and the builder number may be overridden in flutter
build by specifying --build-name and --build-number, respectively.
In Android, build-name is used as versionName while build-number used as versionCode.
Read more about Android versioning at https://developer.android.com/studio/publish/versioning
In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
Read more about iOS versioning at
https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1
environment:
sdk: ">=2.15.1 <3.1.0"
Dependencies specify other packages that your package needs in order to work.
To automatically upgrade your package dependencies to the latest versions
consider running
flutter pub upgrade --major-versions
. Alternatively,dependencies can be manually updated by changing the version numbers below to
the latest version available on pub.dev. To see which dependencies have newer
versions available, run
flutter pub outdated
.dependencies:
flutter:
sdk: flutter
provider: ^6.0.1
intl: ^0.17.0
http: ^0.13.3
shared_preferences: ^2.0.6
image_picker: ^0.8.1+1
cached_network_image: ^2.3.3
url_launcher: ^6.0.9
material_design_icons_flutter: ^5.0.6595
The following adds the Cupertino Icons font to your application.
Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
flutter_launcher_icons: ^0.9.2
dev_dependencies:
flutter_test:
sdk: flutter
#flutter_launcher_name: "^0.0.1"
flutter_app_name: ^0.1.0
flutter_staggered_grid_view: ^0.4.0
flutter_app_name:
name: "FansInc"
#flutter_launcher_name:
#name: "FansInc"
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/images/aw1_logo.png"
The "flutter_lints" package below contains a set of recommended lints to
encourage good coding practices. The lint set provided by the package is
activated in the
analysis_options.yaml
file located at the root of yourpackage. See that file for information about deactivating specific lint
rules and activating additional ones.
flutter_lints: ^1.0.0
For information on the generic Dart part of this file, see the
following page: https://dart.dev/tools/pub/pubspec
The following section is specific to Flutter.
flutter:
The following line ensures that the Material Icons font is
included with your application, so that you can use the icons in
the material Icons class.
uses-material-design: true
To add assets to your application, add an assets section, like this:
assets:
An image asset can refer to one or more resolution-specific "variants", see
https://flutter.dev/assets-and-images/#resolution-aware.
For details regarding adding assets from package dependencies, see
https://flutter.dev/assets-and-images/#from-packages
To add custom fonts to your application, add a fonts section here,
in this "flutter" section. Each entry in this list should have a
"family" key with the font family name, and a "fonts" key with a
list giving the asset and other descriptors for the font. For
example:
fonts:
- family: ProximaNova
fonts:
- asset: assets/fonts/ProximaNova-Regular.otf
- asset: fonts/Schyler-Italic.ttf
style: italic
- family: Trajan Pro
fonts:
- asset: fonts/TrajanPro.ttf
- asset: fonts/TrajanPro_Bold.ttf
weight: 700
For details regarding fonts from package dependencies,
see https://flutter.dev/custom-fonts/#from-packages
The text was updated successfully, but these errors were encountered: