Khaoula MEHAR
Khaoula MEHAR

Reputation: 83

Check that your config file `flutter_launcher_icons.yaml` has a `flutter_icons` section

enter image description here

any one have solution to this problem i am running flutter pub run flutter_launcher_icons:main and it is not working for me

Upvotes: 3

Views: 8758

Answers (6)

NYT_ SKY
NYT_ SKY

Reputation: 29

for me this worked:

on pubspec.yaml, below the dependencies itself

dependencies:
  flutter_launcher_icons: ^0.13.1
  flutter:
    sdk: flutter

on the lowest part of the yaml file

flutter_launcher_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/compass.png"
  min_sdk_android: 21 # android min sdk min:16, default 21
  remove_alpha_ios: true

then I just ran the cmd

flutter pub run flutter_launcher_icons

Upvotes: 0

JAYAVARDHAN J
JAYAVARDHAN J

Reputation: 1

if dependencies are upgraded degrade it to mentioned version and use it.

dev_dependencies:
  flutter_launcher_icons: "^0.9.2"
flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/icon/icon.png"

and also change in pubspec.yaml

dependencies:
  flutter_launcher_icons: ^0.9.2

Upvotes: 0

Samer Alqadi
Samer Alqadi

Reputation: 21

Just ... Restart android studio

run

  1. flutter clean
  2. flutter pub get
  3. flutter pub run flutter_launcher_icons:main
  4. flutter run

Upvotes: 2

mcdaqc
mcdaqc

Reputation: 41

I just solved the same error you have, and it was something so simple that many of us do not realize it sometimes.

  • Verify that the terminal is in your project folder.
  • Try putting flutter_launcher_icons: any in the dev_dependencies: section like in the image.
  • Verify correct indentation in pubspec.yaml

click to see image

Upvotes: 2

Mohamed Nedaa
Mohamed Nedaa

Reputation: 1

if you facing this problem

✗ ERROR: NoConfigFoundException
Check that your config file flutter_launcher_icons.yaml has a flutter_icons section

try this

  1. uninstall the app from the phone or emulator

  2. Go To Power Shell and run as Administrator

  3. cd ( your project path )

  4. flutter pub get

  5. flutter pub run flutter_launcher_icons:main

  6. flutter run

Upvotes: 0

Josteve Adekanbi
Josteve Adekanbi

Reputation: 12703

Your pubspec.yaml should be like this:

dev_dependencies:
  flutter_launcher_icons: "^0.9.2"

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/icon/icon.png"

Notice where flutter_launcher_icons was used and where flutter_icons was used.

Upvotes: 15

Related Questions