fluttercommunity / flutter_launcher_icons

Flutter Launcher Icons - A package which simplifies the task of updating your Flutter app's launcher icon. Fully flexible, allowing you to choose what platform you wish to update the launcher icon for and if you want, the option to keep your old launcher icon in case you want to revert back sometime in the future. Maintainer: @MarkOSullivan94

Home Page:https://pub.dev/packages/flutter_launcher_icons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Could not find a file named "pubspec.yaml"

MH0386 opened this issue · comments

ℹ️ Info

Version: e.g. v0.13.1

💬 Description

input: flutter pub run flutter_launcher_icons:generate
output:

Deprecated. Use dart run  instead.
Could not find a file named "pubspec.yaml" in "C:\Users\moham\AppData\Local\Pub\Cache\hosted\pub.dev\path_provider_windows-2.2.1".

📜 Pubspec.yaml

name: chatacter
description: "A new Flutter project."
version: 1.0.0+1
environment:
    sdk: ">=3.3.0 <4.0.0"
dependencies:
    flutter:
        sdk: flutter
    cupertino_icons: ^1.0.6
    http: ^1.2.1
    animated_text_kit: ^4.2.2
    font_awesome_flutter: ^10.7.0
    url_launcher: ^6.2.5
    # google_fonts: ^6.2.0
    path_provider: ^2.0.8
    flutter_launcher_icons: ^0.13.1
dev_dependencies:
    flutter_test:
        sdk: flutter
    flutter_lints: ^3.0.0
    rename: ^3.0.1
flutter_launcher_icons:
    android: true
    image_path: "assets/app_logo.png"
    min_sdk_android: 21 # android min sdk min:16, default 21
    web:
        generate: true
        image_path: "assets/app_logo.png"
        background_color: "#hexcode"
        theme_color: "#hexcode"
    windows:
        generate: true
        image_path: "assets/app_logo.png"
        icon_size: 48
flutter:
    uses-material-design: true
commented

You have to replace flutter_launcher_icons by flutter_icons in your pubspec.yaml file.

For instance :

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

This seems to be an issue with dart run. The following fixed it for me…

flutter clean
flutter pub get

@KomInc running v0.13.1 yields this warning:

⚠ Warning: flutter_icons has been deprecated please use flutter_launcher_icons instead in your yaml files