Comments (10)
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.
hi @xiechunyan , are you properly indenting the file?,
from flutter_launcher_icons.
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.
I've found the reason, thank you.
from flutter_launcher_icons.
@franzsilva / @xiechunyan can one of you close this issue.
from flutter_launcher_icons.
und the reason, thank you.
Thanks for telling us the solution...
from flutter_launcher_icons.
@xiechunyan So, how to fix it? I got the same issue.
from flutter_launcher_icons.
@Calvin92 paste your pubspec.yaml with the exact indentation here
from flutter_launcher_icons.
@Calvin92 Awesome solution...
from flutter_launcher_icons.
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)
- [BUG] FormatException: Missing argument for "file".
- [BUG] Execution fails when renaming the default Runner project
- [BUG] Could not find a file named "pubspec.yaml"
- [BUG] ✗ ERROR: NoConfigFoundException No configuration found in flutter_launcher_icons.yaml or in pubspec.yaml. In case file exists in different directory use --file option #0 createIconsFromArguments (package:flutter_launcher_icons/main.dart:75:7) #1 main (file:///C:/Users/ahmed/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_launcher_icons-0.10.0/bin/main.dart:7:26) #2 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:294:33) #3 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
- [BUG] Unhandled Exception: PlatformException(INVALID_ICON, The resource app_icon could not be found. Please make sure it has been added as a drawable resource to your Android head project., null, null) HOT 1
- [BUG] Could not find a file named "pubspec.yaml" HOT 2
- Dart 2.18.2 is incompatible
- [BUG] Not all futures are awaited so impossible to create a dart custom dart script HOT 1
- [BUG] printStatus not using configured logger HOT 1
- [BUG] Backround color not changing HOT 2
- [BUG] Black screen on Samsung cellphone instead of white screen with icon in the middle? HOT 1
- [BUG] Adaptive Monochrome Icons are not generated HOT 1
- [BUG] icon resolution decreased
- [BUG] Android icon is zoomed in HOT 2
- [BUG] Icon not updated HOT 2
- [BUG] could not generate launcher icon
- [BUG] Issue with flutter_launcher_icons Background Color on iOS App HOT 2
- [BUG] Could not add icon.
- Icon change is not working for MacOS[BUG]
- [BUG] App icon generation with flavors seems to corrupt project.pbxproj
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_launcher_icons.