我试图使用错误与图标插件,以改变启动图标。在替换文件夹中的图标之前,这一次我想使用为此制作的插件,但是当我运行时会遇到一个错误:
flutter pub run flutter_launcher_icons:main以下是错误:
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
shared_preferences: ^2.0.12
google_fonts: ^2.2.0
flutter_screenutil: ^5.0.3
animated_text_kit: ^4.2.1
shake: ^2.0.0
shake_event: ^0.0.9
flutter_launcher_icons: ^0.9.2
flutter_icons:
image_path_android: "assets/icone-appi.png"
image_path_ios: "assets/icone-appi.png"
android: true
ios: true 我试图修改写作中的空格,但没有什么改变。
我认为设置起来更容易,但我找不到错误。
谢谢你的帮助
发布于 2022-01-17 08:19:40
1.设置配置FIle
将您的徽标文件(ex: logo.png)添加到“资产”文件夹中,您必须首先创建该文件夹
将flutter_launcher_icons包添加到pubspec.yaml中,在包的pubspec.yaml中添加如下行
dev_dependencies:
flutter_launcher_icons: ^0.9.2
flutter_icons:
android: true
ios: true
iamge_path: "assets/logo.png"2.运行包
在设置配置之后,所要做的就是在终端中运行包。
flutter pub get
flutter pub run flutter_launcher_icons:mainhttps://stackoverflow.com/questions/70737809
复制相似问题