skip to Main Content

I was trying to create an app logo for my app, since I’m about to deploy and release it, but here’s the issue. I was trying to let the terminal generate the launcher icons which I copied the code from the website:

flutter pub get
flutter pub run flutter_launcher_icons

However when I ran this code on the terminal, this was the result:

 Warning: flutter_icons has been deprecated please use flutter_launcher_icons instead in your yaml files
• Creating default icons Android

✕ Could not generate launcher icons
PathNotFoundException: Cannot open file, path = 'assets/app_logo.png' (OS Error: The system cannot find the file specified.
, errno = 2)

I already added the icon launcher package code on my pubsec.yaml:

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_launcher_icons: ^0.13.1

flutter_icons:
   android: true
   ios: true
   image_path: "assets/app_logo.png"

But for some reason, the system couldn’t find the specific image file, like I already made sure that the image file name is typed properly in my pubsecyaml( as seen above ) based from the project IRC:

(https://phpout.com/wp-content/uploads/2023/07/wxDds.png)

But I still don’t understand what’s the issue, can somebody please help me so I can properly fix this.

I’m expecting the system to read the image file properly to generate the launcher icons.

2

Answers


  1. as the error suggested:

    flutter_icons has been deprecated please use flutter_launcher_icons
    

    Remove the old package from pubspec and Use the updated package : flutter_launcher_icons

    flutter_launcher_icons:
       android: true
       ios: true
       image_path: "assets/app_logo.png"
    
    Login or Signup to reply.
  2. Try using this:

    flutter_launcher_icons:
      android: "launcher_icon"
      ios: true
      image_path: "assets/app_logo.png"
      min_sdk_android: 21
    

    If you look at your error it shows that flutter_icon has been depreciated, use flutter_launcher_icons

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search