我想为颤振创建我的启动器图标。我的配置(pubspec.yaml)如下所示。
...
# 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_spinkit: ^5.1.0
url_launcher: ^6.0.17
http: ^0.13.4
intl: ^0.17.0
flutter_launcher_icons: ^0.9.2
flutter_icons:
android: true
ios: true
image_path: "assets/logo_blue.png"
...
flutter pub add flutter_launcher_icons
我通过控制台 ( )安装了 flutter_launcher_icon 。之后我将配置(见上文)添加到 pubspec.yaml 文件中,并在控制台中输入以下两个命令:
flutter pub get
flutter pub run flutter_launcher_icons:main
如文档(https://pub.dev/packages/flutter_launcher_icons)中所述。但是在第二个命令之后,我收到以下错误消息,并且 pub 以退出代码 255 结束。
════════════════════════════════════════════
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:///C:/Users/chris/AppData/Local/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)
pub finished with exit code 255
我做错了什么?
谢谢!