Giter Club home page Giter Club logo

Comments (10)

stnieder avatar stnieder commented on July 18, 2024 1

After posting, I've found the solution by myself. And now my pubspec.yaml looks like this.

name: ProjectName
description: A new Flutter project.

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 1.0.0+1

environment:
  sdk: ">=2.0.0-dev.68.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

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

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter_icons:
  image_path: "images/time2eat.png"
  android: true
  ios: true

# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true


  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.io/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.io/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.io/custom-fonts/#from-packages

After that editing I ran flutter clean and flutter pub pub run flutter_launcher_icons:main

from flutter_launcher_icons.

franzsilva avatar franzsilva commented on July 18, 2024

hi @xiechunyan , are you properly indenting the file?,

from flutter_launcher_icons.

xiechunyan avatar xiechunyan commented on July 18, 2024

The previous error was caused by indent, and now the correct indent is reported as follows:
Unhandled exception:
Error on line 2, column 15: Unexpected character.
description: ��
^
#0 Parser.parse (package:yaml/src/parser.dart:50:7)
#1 Loader._loadMapping (package:yaml/src/loader.dart:171:23)
#2 Loader._loadNode (package:yaml/src/loader.dart:86:16)
#3 Loader._loadDocument (package:yaml/src/loader.dart:62:20)
#4 Loader.load (package:yaml/src/loader.dart:54:20)
#5 loadYamlDocument (package:yaml/yaml.dart:51:25)
#6 loadYamlNode (package:yaml/yaml.dart:42:5)
#7 loadYaml (package:yaml/yaml.dart:34:5)
#8 YamlConfigParser.parse (package:dart_config/parsers/config_parser_yaml.dart:13:15)
#9 Config.readConfig. (package:dart_config/config.dart:44:25)
#10 _RootZone.runUnary (dart:async/zone.dart:1381)
#11 _FutureListener.handleValue (dart:async/future_impl.dart:129)
#12 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:633)
#13 _Future._propagateToListeners (dart:async/future_impl.dart:662)
#14 _Future._completeWithValue (dart:async/future_impl.dart:477)
#15 _Future._asyncComplete. (dart:async/future_impl.dart:507)
#16 _microtaskLoop (dart:async/schedule_microtask.dart:41)
#17 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#18 _runPendingImmediateCallback (dart:isolate-patch/dart:isolate/isolate_patch.dart:113)
#19 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:166)
pub finished with exit code 255

How can I solve this problem?

from flutter_launcher_icons.

xiechunyan avatar xiechunyan commented on July 18, 2024

I've found the reason, thank you.

from flutter_launcher_icons.

MarkOSullivan94 avatar MarkOSullivan94 commented on July 18, 2024

@franzsilva / @xiechunyan can one of you close this issue.

from flutter_launcher_icons.

g-balas avatar g-balas commented on July 18, 2024

und the reason, thank you.

Thanks for telling us the solution...

from flutter_launcher_icons.

Calvin92 avatar Calvin92 commented on July 18, 2024

@xiechunyan So, how to fix it? I got the same issue.

from flutter_launcher_icons.

MarkOSullivan94 avatar MarkOSullivan94 commented on July 18, 2024

@Calvin92 paste your pubspec.yaml with the exact indentation here

from flutter_launcher_icons.

stnieder avatar stnieder commented on July 18, 2024

@Calvin92 Awesome solution...

from flutter_launcher_icons.

rakonsake avatar rakonsake commented on July 18, 2024

I got the same problem. I simply solved it by deleting the default icon (both android and ios) before running the command.

from flutter_launcher_icons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.