Comments (14)
I'm getting exactly the same...looks like an incompatible XML package.
Apparently, at some point the API for the xml packaged changed: the XmlElement constructor no longer takes "attributes" and "children" as positional arguments, but only as named arguments.
There are 9 invocations of that constructor in bitmap_font.dart. Adding "attributes:" and "children:" to the second and third arguments of each call allows it to compile successfully.
from flutter_launcher_icons.
I'm getting exactly the same...looks like an incompatible XML package.
Apparently, at some point the API for the xml packaged changed: the XmlElement constructor no longer takes "attributes" and "children" as positional arguments, but only as named arguments.
There are 9 invocations of that constructor in bitmap_font.dart. Adding "attributes:" and "children:" to the second and third arguments of each call allows it to compile successfully.can u give me some example please?
Hi fachirzalrifadhi
You need to go to the file location mentioned in error(in this case file:///home/malcolm/external_sources/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.0.5/lib/src/bitmap_font.dart) and remove the last two arguments from xml constructor
To be more clear if the constuctor is like below
var node = new XML.XmlElement(new XML.XmlName('char'), attrs, []);
It will become
var node = new XML.XmlElement(new XML.XmlName('char'));
You need to do this process for all the lines which in error list which u got. Then execute the command it will work.
from flutter_launcher_icons.
I have the same issue. I fixed this by remove all the arguments except the first one.
Steps:
- Open bitmap_font.dart file with any TextEditor
- Find all the "new XML.XmlElement(" line then remove all the arguments except the first one
- Save the file
- Restart your IDE
from flutter_launcher_icons.
Yes, I have same issue
from flutter_launcher_icons.
I'm getting exactly the same...looks like an incompatible XML package.
Apparently, at some point the API for the xml packaged changed: the XmlElement constructor no longer takes "attributes" and "children" as positional arguments, but only as named arguments.
There are 9 invocations of that constructor in bitmap_font.dart. Adding "attributes:" and "children:" to the second and third arguments of each call allows it to compile successfully.
can u give me some example please?
from flutter_launcher_icons.
I have the same issue. I fixed this by remove all the arguments except the first one.
Steps:
- Open bitmap_font.dart file with any TextEditor
- Find all the "new XML.XmlElement(" line then remove all the arguments except the first one
- Save the file
- Restart your IDE
can u give me the example please?
from flutter_launcher_icons.
I'm getting exactly the same...looks like an incompatible XML package.
Apparently, at some point the API for the xml packaged changed: the XmlElement constructor no longer takes "attributes" and "children" as positional arguments, but only as named arguments.
There are 9 invocations of that constructor in bitmap_font.dart. Adding "attributes:" and "children:" to the second and third arguments of each call allows it to compile successfully.can u give me some example please?
Hi fachirzalrifadhi
You need to go to the file location mentioned in error(in this case file:///home/malcolm/external_sources/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.0.5/lib/src/bitmap_font.dart) and remove the last two arguments from xml constructor
To be more clear if the constuctor is like below
var node = new XML.XmlElement(new XML.XmlName('char'), attrs, []);
It will become
var node = new XML.XmlElement(new XML.XmlName('char'));
You need to do this process for all the lines which in error list which u got. Then execute the command it will work.
isn't still work
from flutter_launcher_icons.
I'm getting exactly the same...looks like an incompatible XML package.
Apparently, at some point the API for the xml packaged changed: the XmlElement constructor no longer takes "attributes" and "children" as positional arguments, but only as named arguments.
There are 9 invocations of that constructor in bitmap_font.dart. Adding "attributes:" and "children:" to the second and third arguments of each call allows it to compile successfully.can u give me some example please?
Hi fachirzalrifadhi
You need to go to the file location mentioned in error(in this case file:///home/malcolm/external_sources/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.0.5/lib/src/bitmap_font.dart) and remove the last two arguments from xml constructor
To be more clear if the constuctor is like below
var node = new XML.XmlElement(new XML.XmlName('char'), attrs, []);
It will become
var node = new XML.XmlElement(new XML.XmlName('char'));
You need to do this process for all the lines which in error list which u got. Then execute the command it will work.isn't still work
had same issue for me. IT worked. Have you replaced it in all lines mentioned in your error log? If still not working post the error which you are getting.
from flutter_launcher_icons.
fixed i've tried delete some args to be like this on bitmap_font.dart
` XML.XmlDocument _parseTextFnt(String content) {
var children = <XML.XmlNode>[];
var pageList = <XML.XmlNode>[];
var charList = <XML.XmlNode>[];
var kerningList = <XML.XmlNode>[];
var charsAttrs;
var kerningsAttrs;
List<String> lines = content.split('\n');
for (String line in lines) {
if (line.isEmpty) {
continue;
}
List<String> tk = line.split(' ');
switch (tk[0]) {
case 'info':
var attrs = _parseParameters(tk);
var info = new XML.XmlElement(new XML.XmlName('info'));
children.add(info);
break;
case 'common':
var attrs = _parseParameters(tk);
var node = new XML.XmlElement(new XML.XmlName('common'));
children.add(node);
break;
case 'page':
var attrs = _parseParameters(tk);
var page = new XML.XmlElement(new XML.XmlName('page'));
pageList.add(page);
break;
case 'chars':
charsAttrs = _parseParameters(tk);
break;
case 'char':
var attrs = _parseParameters(tk);
var node = new XML.XmlElement(new XML.XmlName('char'));
charList.add(node);
break;
case 'kernings':
kerningsAttrs = _parseParameters(tk);
break;
case 'kerning':
var attrs = _parseParameters(tk);
var node = new XML.XmlElement(new XML.XmlName('kerning'));
kerningList.add(node);
break;
}
}
if (charsAttrs != null || charList.isNotEmpty) {
var node = new XML.XmlElement(new XML.XmlName('chars'));
children.add(node);
}
if (kerningsAttrs != null || kerningList.isNotEmpty) {
var node = new XML.XmlElement(new XML.XmlName('kernings'));
children.add(node);
}
if (pageList.isNotEmpty) {
var pages = new XML.XmlElement(new XML.XmlName('pages'));
children.add(pages);
}
var xml = new XML.XmlElement(new XML.XmlName('font'));
var doc = new XML.XmlDocument([xml]);
return doc;
}`
from flutter_launcher_icons.
seems to be related to brendan-duncan/image#89
from flutter_launcher_icons.
even I faced the same issue, I tried removing the extra arguments but it doesn't work
from flutter_launcher_icons.
Currently away atm but will be back this weekend and I'll try and investigate this issue then
from flutter_launcher_icons.
This has been patched in the master branch of brendan-duncan/image
.
You could temporarily point your flutter_launcher_icons
package to Github to get the latest patch.
# ~/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.7.0/pubspec.yaml
image:
git:
url: https://github.com/brendan-duncan/image.git
Perform a pub get
and you'll be able to generate launcher icons again.
from flutter_launcher_icons.
I think this should be working fine now. Looks like the xml package developer published an update which caused a ripple effect causing some issues with packages which depended on it.
I tried switching the image dependency to the commit which merged the PR for the fix in the image package but that no longer seems to be working, so whenever I removed my changes and tested the package, it worked fine for me.
Let me know if anyone is still having issues otherwise I'll close this issue.
from flutter_launcher_icons.
Related Issues (20)
- ic_launcher icon not working for android push notifications HOT 2
- [FEATURE REQUEST] Generate `favicon.ico` for web HOT 1
- [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.
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.