Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to precompile flutter_launcher_icons:main #39

Closed
christian-muertz opened this issue Jul 17, 2018 · 22 comments
Closed

Failed to precompile flutter_launcher_icons:main #39

christian-muertz opened this issue Jul 17, 2018 · 22 comments
Assignees

Comments

@christian-muertz
Copy link

If i run flutter pub pub run flutter_launcher_icons:main i get this error:

Failed to precompile flutter_launcher_icons:main:
file:///Users/chris/Development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_config-0.5.0/lib/loaders/config_loader_filesystem.dart:13:36: Error: The parameter 'path' of the method 'ConfigFilesystemLoader::loadConfig' has type dart.core::String, which does not match the corresponding type in the overridden method (dynamic).
Change to a supertype of dynamic (or, for a covariant parameter, a subtype).
  Future<String> loadConfig(String path) {
                                   ^
file:///Users/chris/Development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_config-0.5.0/lib/parsers/config_parser_yaml.dart:10:15: Error: The return type of the method 'YamlConfigParser::parse' is dart.async::Future<dart.core::Map<dynamic, dynamic>>, which does not match the return type of the overridden method (dart.async::Future<dart.core::Map<dart.core::String, dart.core::Object>>).
Change to a subtype of dart.async::Future<dart.core::Map<dart.core::String, dart.core::Object>>.
  Future<Map> parse(String configText) {
              ^
pub finished with exit code 1

LG Chris

@aaronfg
Copy link

aaronfg commented Jul 18, 2018

Same here

Failed to precompile flutter_launcher_icons:main:
file:///C:/Users/aaron/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/dart_config-0.5.0/lib/loaders/config_loader_filesystem.dart:
13:36: Error: The parameter 'path' of the method 'ConfigFilesystemLoader::loadConfig' has type dart.core::String, which does not matc
h the corresponding type in the overridden method (dynamic).
Change to a supertype of dynamic (or, for a covariant parameter, a subtype).
  Future<String> loadConfig(String path) {
                                   ^
file:///C:/Users/aaron/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/dart_config-0.5.0/lib/parsers/config_parser_yaml.dart:10:15:
 Error: The return type of the method 'YamlConfigParser::parse' is dart.async::Future<dart.core::Map<dynamic, dynamic>>, which does n
ot match the return type of the overridden method (dart.async::Future<dart.core::Map<dart.core::String, dart.core::Object>>).
Change to a subtype of dart.async::Future<dart.core::Map<dart.core::String, dart.core::Object>>.
  Future<Map> parse(String configText) {
              ^
pub finished with exit code 1

@devsontx
Copy link

same here

@MarkOSullivan94
Copy link
Collaborator

MarkOSullivan94 commented Jul 18, 2018

Thanks for reporting this.

@christian-muertz @aaronfg @devsontx can you all post your pubspec.yaml when you received this error message?

@christian-muertz
Copy link
Author

name: lclip

dependencies:
  flutter:
    sdk: flutter

  intl: ^0.15.6
  cupertino_icons: ^0.1.0
  image_picker: ^0.4.4
  cached_network_image: ^0.4.1+1
  
dev_dependencies:
  flutter_test:
    sdk: flutter

  flutter_launcher_icons: ^0.5.2

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

flutter:
  uses-material-design: true

@aaronfg
Copy link

aaronfg commented Jul 18, 2018

name: aaa
description: aaa app

dependencies:
  flutter:
    sdk: flutter

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

  flutter_launcher_icons: "^0.5.2"

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter_icons:
  android: true
  ios: true
  image_path: "assets/icon/Icon.png"
  adaptive_icon_background: "#FFe3144f"
  adaptive_icon_foreground: "assets/icon/Icon_adaptive.png"


  assets:
    - assets/images/home_button.png
    - assets/images/home_button_press.png
    - assets/images/up_button.png
    - assets/images/down_button.png

  fonts:
     - family: TradeGothicBold
       fonts:
        - asset: assets/fonts/TradeGothic-Bold.ttf
          weight: 700

@devsontx
Copy link

devsontx commented Jul 19, 2018

name: b
description: b Application

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^0.1.0
  shared_preferences: ^0.4.0
  url_launcher: ^3.0.0
  intl: "^0.15.4"
  validator: ">=0.0.4 <0.1.0"
  flutter_launcher_icons: ^0.5.2
  barcode_scan:
    git:
      url: git@github.com:devsontx/flutter_barcode_reader.git
  qr_flutter: ^1.1.1
  date_format: "^1.0.4"
  rxdart: "^0.18.0"
  connectivity: ^0.3.1

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter_icons:
  image_path: "assets/images/ic_launcher.png"
  android: true
  ios: "App-Icon"

flutter:
  uses-material-design: true
  assets:
    - assets/images/someimage.png

@christian-muertz
Copy link
Author

@devsontx please use markdown so your config has its original format

@MarkOSullivan94 MarkOSullivan94 self-assigned this Jul 19, 2018
@devsontx
Copy link

@christian-muertz I updated it. Thanks.

@devsontx
Copy link

@MarkOSullivan94 any luck? :)

@MarkOSullivan94
Copy link
Collaborator

Earliest I'll get a chance to have a quick look over it will be tomorrow.

@franzsilva could you investigate?

@laughingpain
Copy link

with flutter 0.5.1 beta no problems

@volkangurol
Copy link

i switched to flutter channel dev branch and updated - fixes the issue

@ffeu
Copy link

ffeu commented Jul 29, 2018

Same error here

flutter doctor

Flutter 0.5.8-pre.98 • channel master • https://github.com/flutter/flutter
Framework • revision f0639bb022 (10 days ago) • 2018-07-27 22:10:39 -0700
Engine • revision 72a38a6b13
Tools • Dart 2.0.0-dev.69.0.flutter-937ee2e8ca

pubspec.yaml

dev_dependencies:
  flutter_launcher_icons: "^0.5.2"
[...]
flutter_icons:
  android: true 
  ios: true
  image_path: "assets/logo/web_hi_res_512.png"
  # adaptive_icon_background: "#FFFAFAFA"
  # adaptive_icon_foreground: "assets/icon/icon-foreground.png"

As @volkangurol stated, after flutter channel dev, it worked as expected.

Creating icons Android
Overwriting default Android launcher icon with new icon
Overwriting default iOS launcher icon with new icon

@ffeu ffeu mentioned this issue Jul 30, 2018
@rvowles
Copy link

rvowles commented Aug 11, 2018

didn't work for me, master and dev both have this error.

@sbesnard
Copy link

Same here with 0.6.0

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, v0.5.8, on Mac OS X 10.13.6 17G65, locale fr-BE)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
[✓] Android Studio (version 3.1)
[✓] VS Code (version 1.25.1)
[✓] Connected devices (1 available)

• No issues found!

gives

Failed to precompile flutter_launcher_icons:main:
file:///Users/sergebesnard/Development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_config-0.5.0/lib/loaders/config_loader_filesystem.dart:13:36: Error: The parameter 'path' of the method 'ConfigFilesystemLoader::loadConfig' has type dart.core::String, which does not match the corresponding type in the overridden method (dynamic).
Change to a supertype of dynamic (or, for a covariant parameter, a subtype).
  Future<String> loadConfig(String path) {
                                   ^
file:///Users/sergebesnard/Development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_config-0.5.0/lib/parsers/config_parser_yaml.dart:10:15: Error: The return type of the method 'YamlConfigParser::parse' is dart.async::Future<dart.core::Map<dynamic, dynamic>>, which does not match the return type of the overridden method (dart.async::Future<dart.core::Map<dart.core::String, dart.core::Object>>).
Change to a subtype of dart.async::Future<dart.core::Map<dart.core::String, dart.core::Object>>.
  Future<Map> parse(String configText) {
              ^
pub finished with exit code 1

pubspec.yaml

  flutter_launcher_icons: "^0.6.0"

flutter_icons:
  android: false
  ios: "value"
  image_path: "assets/icon/acolyte-2-1024-fond-blanc.png"
  #adaptive_icon_background: "#FFFFFF"
  #adaptive_icon_foreground: "assets/icon/icon-foreground.png"

@dsaiko
Copy link

dsaiko commented Aug 14, 2018

Same here :-(

Flutter 0.5.8

Failed to precompile flutter_launcher_icons:main:
file:///Volumes/DATA/development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_config-0.5.0/lib/loaders/config_loader_filesystem.dart:13:36: Error: The parameter 'path' of the method 'ConfigFilesystemLoader::loadConfig' has type dart.core::String, which does not match the corresponding type in the overridden method (dynamic).
Change to a supertype of dynamic (or, for a covariant parameter, a subtype).
  Future<String> loadConfig(String path) {
                                   ^
file:///Volumes/DATA/development/flutter/.pub-cache/hosted/pub.dartlang.org/dart_config-0.5.0/lib/parsers/config_parser_yaml.dart:10:15: Error: The return type of the method 'YamlConfigParser::parse' is dart.async::Future<dart.core::Map<dynamic, dynamic>>, which does not match the return type of the overridden method (dart.async::Future<dart.core::Map<dart.core::String, dart.core::Object>>).
Change to a subtype of dart.async::Future<dart.core::Map<dart.core::String, dart.core::Object>>.
  Future<Map> parse(String configText) {
              ^
pub finished with exit code 1

dev_dependencies:
  flutter_launcher_icons: "^0.6.0"

flutter_icons:
  android: true
  ios: true
  image_path: "docs/icon.png"

@sbesnard
Copy link

Damn ! I switched back to beta, then it worked 8°

flutter channel beta
flutter pub get
flutter pub pub run flutter_launcher_icons:main

Black voodoo magic, I tell you

@MarkOSullivan94
Copy link
Collaborator

Is there anyone still having this issue?

@christian-muertz
Copy link
Author

Gone! :D

@Djameleddine21
Copy link

Djameleddine21 commented Aug 16, 2019

Hi ,
the problem is in the url of icon, because it's obligatory to make the icon in the folder icon like this :
flutter_icons:
image_path: "icon/icon.png"
android: true
ios: true
because if ou make in the path image_path: "assets/icon/icon.png" create a problem when you use the command flutter pub pub run flutter_launcher_icons:main

@saif97
Copy link

saif97 commented Sep 2, 2019

In my case, this happened because I've used firebase (https://pub.dev/packages/cloud_firestore) for flutter web but the official dart plugin doesn't supported Flutter web yet.

@Nayananga
Copy link

Hi ,
the problem is in the url of icon, because it's obligatory to make the icon in the folder icon like this :
flutter_icons:
image_path: "icon/icon.png"
android: true
ios: true
because if ou make in the path image_path: "assets/icon/icon.png" create a problem when you use the command flutter pub pub run flutter_launcher_icons:main

This resolved my issue. Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests