flutter_launcher_icons
flutter_launcher_icons copied to clipboard
Failure for iOS: FileSystemException: Cannot open file
I've tried running the tool for the first time for iOS and I get
flutter pub run flutter_launcher_icons:main
Android minSdkVersion = 16
Creating default icons Android
Overwriting the default Android launcher icon with a new icon
Overwriting default iOS launcher icon with new icon
FileSystemException: Cannot open file, path = 'ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]' (OS Error: No such file or directory, errno = 2)
pub finished with exit code 2
[✓] Flutter (Channel beta, v1.17.0, on Mac OS X 10.15.4 19E287, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.44.0)
[✓] Connected device (4 available)
• No issues found!
flutter_launcher_icons: ^0.7.4
It seems I'm not the only one: https://github.com/fluttercommunity/flutter_launcher_icons/issues/10#issuecomment-614685889
Previously I've used another tool to generate iOS icons and that used a different path: ios/Runner/Assets.xcassets/iOS/AppIcon.appiconset
(note the extra iOS directory)
I've fixed the problem by deleting it and reverting to the original flutter generated one but I think this tool should probably be resilient to this situation, or document that it expects the structure that flutter originally generates (maybe it already does).
I have the exact same issue !
Android minSdkVersion = 18
Creating default icons Android
Adding a new Android launcher icon
Overwriting default iOS launcher icon with new icon
FileSystemException: Cannot open file, path = 'ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]' (OS Error: Permission denied, errno = 13)
pub finished with exit code 2
Me too
Overwriting default iOS launcher icon with new icon
FileSystemException: Cannot open file, path = 'ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]' (OS Error: No such file or directory, errno = 2)
In the meanwhile, I went with this solution: https://stackoverflow.com/a/55054303/4865751 manually updating the icons...
Me too
Android minSdkVersion = 16 Creating default icons Android Overwriting the default Android launcher icon with a new icon Overwriting default iOS launcher icon with new icon FileSystemException: Cannot open file, path = 'ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]' (OS Error: Permission denied, errno = 13)
Try to check the file path you provided. I have the same issue and I was providing wrong file path. I was using icon
instead of icons
in my path list. Like:
I was using before and able to see the error:
assets/icon/icon_result.png
my files original path:
assets/icons/icon_result.png
Also, try to run the command after shutting down flutter app if running.
Me too
Android minSdkVersion = 16 Creating default icons Android Overwriting the default Android launcher icon with a new icon Overwriting default iOS launcher icon with new icon FileSystemException: Cannot open file, path = 'ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]' (OS Error: Permission denied, errno = 13)
I'm having the same problem as you - note the error is slightly different. Bizarrely I can get it working with a simple screenshot on my mac, but the actual image I want to use causes problems. Having resized the image I did get some images to generate but still couldn't get the full set to work. Perhaps you might have more luck!
Same initial error, Android Studio 4 on windows 10
Android minSdkVersion = 16 Creating default icons Android FileSystemException: Cannot open file, path = 'assets/images/app_icon.png' (OS Error: The system cannot find the path specified. , errno = 3)
But resolved. Be sure to define icon paths relative to the puspec.yaml eg (lib/assets/ etc) if you have a lib dir.
Gah this is so annoying. works fine with Android but iOS doesn't
on ios the path (to the icons) might be relative to a different place -- eg the project root folder?
I came across this issue because I deleted my AppIcon before generating the new one. Then when I saw this issue, I added a new "image set" and called it AppIcon, however that is also wrong. You have to add a new
"iOS app icon" which is a special type of asset in the bundle.
I did the same @tamoyal . I deleted the default flutter
AppIcon
set and created my own blank one, then re-ran the command: flutter pub run flutter_launcher_icons:main
and it seemed to work.
However, when i re-opened the flutter app in xcode, it looks like all the generated icons are "unassigned":
And of course the icon doesn't work in the simulator:
Does anyone else see this issue?
My workaround is to manually drag them in to the correct sizes (which was a fun puzzle lol), but it seems we're still missing 3 icons:
- 58x58px @ 2x
- 80x80px @ 2x
- 40x40px @ 2x
Simple Solution: Run : flutter create . in Project Directory and you are done. Now you can use launcher icon package freely.
You may need to add lib
to the path name. This was what worked for me.
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "lib/assets/logo.png"
adaptive_icon_background: "#C77DFF"
it worked for me
FileSystemException: Cannot open file, path = 'ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]' (OS Error: Permission denied, errno = 13)
Had a similar error to this when trying to use a png image exported from figma. For some reason re-exporting the same image and trying again somehow solved it. I think the error might be misleading but not really sure what the cause was.