【发布时间】:2021-04-09 08:04:14
【问题描述】:
所以我尝试使用 flutter_launcher_icons 自动更改我的简单兴趣计算器应用的启动器图标。
这是我在 pubspec.yaml 中的代码
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.0
flutter_launcher_icons: ^0.8.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.8.0"
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon.png"
flutter:
uses-material-design: true
我在运行 flutter pub get & 后得到的错误 flutter pub 运行 flutter_launcher_icons:main
Failed to precompile flutter_launcher_icons:main:
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.8.1/lib/utils.dart:1:8: Error: Error when reading '/C:/src/flutter/flutter/.pub-cache/hosted/
pub.dartlang.org/image-2.1.19/lib/image.dart': The system cannot find the path specified.
import 'package:image/image.dart';
^
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.8.1/lib/android.dart:4:8: Error: Error when reading '/C:/src/flutter/flutter/.pub-cache/hoste
d/pub.dartlang.org/image-2.1.19/lib/image.dart': The system cannot find the path specified.
import 'package:image/image.dart';
^
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.8.1/lib/utils.dart:3:1: Error: Type 'Image' not found.
Image createResizedImage(int iconSize, Image image) {
^^^^^
^^^^^
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.8.1/lib/ios.dart:93:1: Error: Type 'Image' not found.
Image createResizedImage(IosIconTemplate template, Image image) {
^^^^^
pub finished with exit code 1
【问题讨论】:
标签: flutter flutter-dependencies