首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误: NoConfigFoundException检查配置文件`flutter_launcher_icons.yaml`是否有`flutter_icons`部分

错误: NoConfigFoundException检查配置文件`flutter_launcher_icons.yaml`是否有`flutter_icons`部分
EN

Stack Overflow用户
提问于 2022-03-31 08:01:57
回答 1查看 169关注 0票数 1

问题描述:我试图在pubspec.yaml文件中添加启动程序图标,但是它显示了这个错误。我甚至尝试过在动荡中增加资产,但仍然不起作用。当我运行flutter pub get时,没有显示错误。然后运行flutter pub run flutter_launcher_icons:main中提到的获取上述错误的命令。

代码语言:javascript
复制
dependencies:
  flutter:
    sdk: flutter

  retrofit: any
  json_annotation: ^3.1.1
  provider: ^4.3.1
  shared_preferences: ^0.5.8
  http: ^0.12.1
  flushbar: ^1.10.4
  dio: ^3.0.10


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2

dev_dependencies:
  flutter_test:
    sdk: flutter

  retrofit_generator : any
  json_serializable: ^3.5.1
  build_runner: any
  flutter_launcher_icons: any

  # 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 your
  # package. See that file for information about deactivating specific lint
  # rules and activating additional ones.
  flutter_lints: ^1.0.0
    # optionally, as transparency is not allowed on app store
    # remove_alpha_ios: true
flutter_icons:
  android: true
  ios: true
  image_path: "assets/icons/ic_launcher_square.png"
# 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 packages.
flutter:
EN

回答 1

Stack Overflow用户

发布于 2022-08-18 17:31:01

这是因为错误的压痕,因为我面临着同样的问题,但现在它对我起了作用。

代码语言:javascript
复制
dev_dependencies:
  flutter_lints: ^1.0.0
  flutter_test:
    sdk: flutter
  flutter_launcher_icons: "^0.10.0"

flutter_icons:
 android: true
 ios: true
 image_path: "assets/images/cloudy.png" 

注意你正在写的行后面的间距。

或者看看这里

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71688978

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档