Comments (18)
Adaptive icons are working for me with v0.5.2! 😃
from flutter_launcher_icons.
Confirmed ;-)
from flutter_launcher_icons.
I'm using plugin on my flutter project.
from flutter_launcher_icons.
Same issue on MacOS, on new project.
Pubspec:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.5.0"
flutter_icons:
android: true
ios: true
image_path: "assets/icon/icon.png"
adaptive_icon_background: "#FDF9F5"
adaptive_icon_foreground: "assets/icon/icon-android-foreground.png"
Running command from the root folder of the project: flutter pub pub run flutter_launcher_icons:main
results in the error stated above.
Complete stack trace:
FileSystemException: Cannot copy file to 'android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml', path = '../assets/ic_launcher.xml' (OS Error: No such file or directory, errno = 2)
#0 _File.throwIfError (dart:io/file_impl.dart:647)
#1 _File.copySync (dart:io/file_impl.dart:352)
#2 createAdaptiveIcons (package:flutter_launcher_icons/android.dart:75:12)
#3 createIcons.<anonymous closure> (package:flutter_launcher_icons/main.dart:28:7)
#4 _RootZone.runUnary (dart:async/zone.dart:1381)
#5 _FutureListener.handleValue (dart:async/future_impl.dart:129)
#6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:638)
#7 Future._propagateToListeners (dart:async/future_impl.dart:667)
#8 Future._complete (dart:async/future_impl.dart:472)
#9 _SyncCompleter.complete (dart:async/future_impl.dart:51)
#10 _completeOnAsyncReturn (dart:async-patch/dart:async/async_patch.dart:292)
#11 loadConfigFile (package:flutter_launcher_icons/main.dart:38:3)
#12 _RootZone.runUnary (dart:async/zone.dart:1381)
#13 _FutureListener.handleValue (dart:async/future_impl.dart:129)
#14 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:638)
#15 Future._propagateToListeners (dart:async/future_impl.dart:667)
#16 Future._completeWithValue (dart:async/future_impl.dart:482)
#17 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:512)
#18 _microtaskLoop (dart:async/schedule_microtask.dart:41)
#19 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#20 _runPendingImmediateCallback (dart:isolate-patch/dart:isolate/isolate_patch.dart:113)
#21 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:166)
This could probably be fixed and be made more robust by using https://pub.dartlang.org/packages/path, although I didn't try myself if it fixes the issue.
from flutter_launcher_icons.
That must be it! I'll change that tonight and do another quick test before releasing it.
My mistake changing it, thought it should have still worked as long as v26 was in it. Apologies for changing that @markmooibroek. I'm going to put that quote in as a comment in the code to make sure I never forget about it.
Might be good to add a unit test to make sure that the directory will always be mipmap-anydpi-v26.
from flutter_launcher_icons.
@mdudek thanks for reporting this!
Will try and do some investigation. Curious if this is just an issue with windows or if it affects all platforms. I'm using Linux.
@markmooibroek pinging you in case you get a chance to check it out before I do.
from flutter_launcher_icons.
Ill have a look, i used the dart ../bin/main.dart
command from the example folder so never got to experience this error. Will try to see if i can reproduce it
from flutter_launcher_icons.
Hmm seems to be working perfectly on MacOS then doing the flutter pub pub run flutter_launcher_icons:main
command from the example. Don't have a Windows PC at hand to test upon :-(
from flutter_launcher_icons.
@mdudek are you getting this issue in the example project or when you actually run the plugin on a real project?
from flutter_launcher_icons.
same problem here
from flutter_launcher_icons.
@lukaspili I think I've seen a similar error before. I'll try and get a fix out tonight.
Thanks for posting the stack trace!
from flutter_launcher_icons.
Working on a fix for this. There's a XML package which looks like it will allow me to use a string to generate an XML file and so means we can get rid of the assets folder with the ic_launcher.xml and colors.xml files and just create a new dart file to act as a template having a string for each file.
from flutter_launcher_icons.
Seems to be working again in the example having replaced relative paths with string alternatives based in a template dart file: #32
from flutter_launcher_icons.
@mdudek @lukaspili @sam0610 let me know if 0.5.1 fixes this, just published it.
from flutter_launcher_icons.
Just tried v0.5.1 and it runs without error. But it seems that app icon is not 'adaptive', there is still used classic 'non-adaptive' version of icon in launcher after apk installation.
from flutter_launcher_icons.
I'm glad there's no error appearing now.
I'm wondering if the adaptive icon isn't working because I changed the directory from mipmap-anydpi-v26 to mipmap-v26, thought it should have worked.
Are you running the example project or your own?
from flutter_launcher_icons.
According to the android docs it needs to be in the mipmap-anydpi (or mipmap-anydpi-v26 to work in combination with lower API levels). I think this is because its an xml file rather than a png.
https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive
Next you must create alternative drawable resources in your app for use with Android 8.0 (API level 26) in res/mipmap-anydpi/ic_launcher.xml
from flutter_launcher_icons.
Heads up everyone v0.5.2 available now. Did a local test before publishing and it's working again for me! Hope it works for everyone else.
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.