[英]ERROR: NoConfigFoundException Check that your config file `flutter_launcher_icons.yaml` has a `flutter_icons` section
Description of problem: I am trying to add the launcher icn in the pubspec.yaml file but it is showing me this error.问题描述:我正在尝试在 pubspec.yaml 文件中添加启动器 icn,但它显示此错误。 I have tried to even add assets too in the flutter but still not working.我什至尝试在 flutter 中添加资产,但仍然无法正常工作。 When I run "flutter pub get" no error is shown.当我运行“flutter pub get”时,没有显示错误。 Then I run the command as mentioned in the flutter pub run flutter_launcher_icons:main getting above error.然后我运行 flutter pub run flutter_launcher_icons:main getting above error 中提到的命令。
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:
It is because of the wrong indentation as I was facing the same problem but now it worked for me `dev_dependencies: flutter_lints: ^1.0.0 flutter_test: sdk: flutter flutter_launcher_icons: "^0.10.0"这是因为我面临同样的问题时缩进错误,但现在它对我有用`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"颤振图标:android:真 ios:真 image_path:“assets/images/cloudy.png”
take care of the spacing behind the lines you are writing注意你正在写的行后面的间距
or take a look here https://i.stack.imgur.com/NvjTo.png或者看看这里https://i.stack.imgur.com/NvjTo.png
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.