Skip to content
New issue

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

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

Already on GitHub? # to your account

Creation of icons fails, if the targetfolder does not exist #10

Closed
gizmomogwai opened this issue Mar 4, 2018 · 7 comments
Closed

Creation of icons fails, if the targetfolder does not exist #10

gizmomogwai opened this issue Mar 4, 2018 · 7 comments

Comments

@gizmomogwai
Copy link

gizmomogwai commented Mar 4, 2018

e.g.

flutter pub pub run  flutter_launcher_icons:main                          00:06
Saving new icon to ic_launcher.png and switching Android launcher icon to it
Unhandled exception:
FileSystemException: Cannot open file, path = 'android/app/src/main/res/mipmap-hdpi/ic_launcher.png' (OS Error: No such file or directory, errno = 2)
#0      _File.throwIfError (dart:io/file_impl.dart:628)
#1      _File.openSync (dart:io/file_impl.dart:472)
#2      _File.writeAsBytesSync (dart:io/file_impl.dart:597)
#3      overwriteExistingIcons (package:flutter_launcher_icons/android.dart:45:7)
#4      convertAndroid.<anonymous closure> (package:flutter_launcher_icons/android.dart:37:46)
#5      List.forEach (dart:core-patch/dart:core/growable_array.dart:274)
#6      convertAndroid (package:flutter_launcher_icons/android.dart:37:19)
#7      main.<anonymous closure> (file:///Users/gizmo/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.2.0/bin/main.dart:13:9)
#8      _RootZone.runUnary (dart:async/zone.dart:1381)
#9      _FutureListener.handleValue (dart:async/future_impl.dart:129)
#10     _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:633)
#11     _Future._propagateToListeners (dart:async/future_impl.dart:662)
#12     _Future._completeWithValue (dart:async/future_impl.dart:477)
#13     _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:507)
#14     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#15     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#16     _runPendingImmediateCallback (dart:isolate-patch/dart:isolate/isolate_patch.dart:113)
#17     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:166)
pub finished with exit code 255
@MarkOSullivan94
Copy link
Collaborator

MarkOSullivan94 commented Mar 20, 2018

@gizmomogwai is this a permissions issue?

Could you try creating the folder android/app/src/main/res/mipmap-hdpi and run flutter pub pub run flutter_launcher_icons:main again?

Also I'd appreciate it if you could update your opening post and paste the error into code tags as it's referencing old issues. Thank you!

@gizmomogwai
Copy link
Author

Hi @MarkOSullivan94 , i think this is not a permission issue.
If I create the folder, everything works, if I delete the folder, the icon generation step fails.

@MarkOSullivan94
Copy link
Collaborator

That's for the reply @gizmomogwai!

I should be free to work on a fix in the coming days and then @franzsilva will merge it into the project

MarkOSullivan94 added a commit to MarkOSullivan94/flutter_launcher_icons that referenced this issue Apr 3, 2018
MarkOSullivan94 added a commit that referenced this issue Apr 11, 2018
Should have fixed issue #10 on GitHub
@MarkOSullivan94
Copy link
Collaborator

Should be fixed in v0.2.1

@gizmomogwai
Copy link
Author

nice .. thanks a lot .. seems to work ...

@MarkOSullivan94
Copy link
Collaborator

Glad it's fixed! Thanks again for reporting.

@KieranSteyn
Copy link

KieranSteyn commented Apr 16, 2020

I'm getting the same Error, but for iOS.
Am using v 0.7.3

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/Icon-App-20x20@1x.png' (OS Error: No such file or directory, errno = 2)

I deleted the assets folder trying to regen the icons because they were getting kicked out of the app store upload saying that they had an alpha channel.

flutter doctor output:
Nologos-MacBook-Air:Hupu-Flutter nologostudios$ flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15.3 19D76, locale en-ZA)
• Flutter version 1.12.13+hotfix.8 at /Users/nologostudios/Documents/Development/flutter
• Framework revision 0b8abb4724 (9 weeks ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/nologostudios/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.9.1

[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 43.0.2
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] Connected device (3 available)
• iPhone 8 Plus • AF2BCAAD-7B10-4BCE-A579-FD33E15E8080 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
• iPhone 11 Pro Max • F6E1DE24-721D-4941-80C7-D6DB23DD8AA5 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
• iPad Pro (12.9-inch) (3rd generation) • BF8A133C-6B48-4F73-AB02-462D728721E5 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)

• No issues found!

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

No branches or pull requests

3 participants