Open sara010 opened 1 year ago
I have the same issue, is it like an update issue because i used this package just last week with another flutter application and it wasnt thriwing this error
I also had this error. Please update the docs.
The lib Documentation is wrong, instead of:
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"
min_sdk_android: 21
You should use:
flutter_icons: <-- Just change this line.
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"
min_sdk_android: 21
Please upgrade to the latest version of the package. We introduced this change in recent release d314ca8
This is still not fixed... @RatakondalaArun
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter_launcher_icons: "^0.13.1"
flutter_icons: #I've tried both `flutter_icons:` and `flutter_launcher_icons:` as the config name...
android: "launcher_icon"
ios: true
image_path: "assets/images/app_logo.png"
min_sdk_android: 21
Building package executable... (2.2s)
Built flutter_launcher_icons:flutter_launcher_icons.
════════════════════════════════════════════
FLUTTER LAUNCHER ICONS (v0.13.1)
════════════════════════════════════════════
Unhandled exception:
✗ 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:84:7)
Unhandled exception:
✗ 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:82:7)
1 main (file:///Users/kevinhhliu/.pub-cache/hosted/pub.flutter-io.cn/flutter_launcher_icons-0.11.0/bin/flutter_launcher_icons.dart:7:26)
2 main (file:///Users/kevinhhliu/.pub-cache/hosted/pub.flutter-io.cn/flutter_launcher_icons-0.11.0/bin/main.dart:7:26)
3 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:295:32)
4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
use the 0.11.0 version i found that use flutter_icons: xxx works!
this is because i view the source code 'flutter_launcher_icons_config.dart': /// Loads flutter launcher icons config from
pubspec.yaml
file static FlutterLauncherIconsConfig? loadConfigFromPubSpec(String prefix) { try { final pubspecFile = File(path.join(prefix, constants.pubspecFilePath)); if (!pubspecFile.existsSync()) { return null; } final pubspecContent = pubspecFile.readAsStringSync(); return yaml.checkedYamlDecode<FlutterLauncherIconsConfig?>( pubspecContent, (json) { // todo: add support for new scheme https://github.com/fluttercommunity/flutter_launcher_icons/issues/373 return json == null || json['flutter_icons'] == null ? null : FlutterLauncherIconsConfig.fromJson(json['flutter_icons']); }, allowNull: true, ); } on yaml.ParsedYamlException catch (e) { throw InvalidConfigException(e.formattedMessage); } catch (e) { rethrow; } } }