简体   繁体   English

flutter flutter_launcher_icons 出错

[英]error with flutter flutter_launcher_icons

I'm trying to use the error with flutter flutter_launcher_icons plugin to change the launcher icons.我正在尝试使用flutter flutter_launcher_icons插件的错误来更改启动器图标。 Before I replaced the icons in the folder but this time I want to use this plugin made for that, but I get an error when I run:在我替换文件夹中的图标之前,但这次我想使用为此制作的插件,但运行时出现错误:

flutter pub run flutter_launcher_icons:main

Here is the error:这是错误:

    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  

I tried to modify the spaces in the writing, but nothing changes.我试图修改写作中的空格,但没有任何改变。

I thought it would be easier to set up, but I can't find the error.我认为设置起来会更容易,但我找不到错误。

Thank you for your help谢谢您的帮助

1. Set up the config FIle 1.设置配置文件

add your logo file (ex: logo.png) into assets folder, you have to create the folder first将您的徽标文件(例如:logo.png)添加到资产文件夹中,您必须先创建该文件夹

add flutter_launcher_icons packages in your pubspec.yaml add a line like this to your package's pubspec.yaml在您的 pubspec.yaml 中添加 flutter_launcher_icons 包 在您的包的 pubspec.yaml 中添加这样一行

dev_dependencies:
  flutter_launcher_icons: ^0.9.2 
    
flutter_icons:
  android: true
  ios: true
  iamge_path: "assets/logo.png"

2. Run the package 2.运行package

After setting up the configuration, all that is left to do is run the package in the terminal.设置好配置后,剩下要做的就是在终端中运行 package。

flutter pub get
flutter pub run flutter_launcher_icons:main

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 flutter_launcher_icons — 在 pubspec.yaml 中检测到错误: - flutter_launcher_icons — Error detected in pubspec.yaml: 安装flutter_launcher_icons的问题 - Issue with the installation of flutter_launcher_icons 无法预编译 flutter_launcher_icons:main: - Failed to precompile flutter_launcher_icons:main: flutter_launcher_icons 不起作用(应用启动器图标损坏/崩溃) - flutter_launcher_icons not working (app launcher icon broken/crashed) Flutter flutter_launcher_icons 错误:发布完成,退出代码为 255 - Flutter flutter_launcher_icons error: pub finished with exit code 255 Flutter “flutter_launcher_icons 0.9.3” android 图标现在可以工作了 - Flutter "flutter_launcher_icons 0.9.3" android icon now working 我们应该在使用后删除 flutter_launcher_icons 吗? - Should we remove flutter_launcher_icons after its use? 我正在使用 flutter_launcher_icons 设置 Flutter 启动器图标:^0.9.2 但是当我运行命令时它显示错误 NoConfigFoundException - I am setting Flutter launcher icon using flutter_launcher_icons: ^0.9.2 but when I run command it shows error NoConfigFoundException 添加 flutter_launcher_Icons 后,gradle 构建失败 - After adding flutter_launcher_Icons gradle build fails 启动图标看起来不像预期的那样 // flutter_launcher_icons - Launch icon doesn't look as intended // flutter_launcher_icons
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM