Skip to content

ns resources generate icons - cli script update needed to support latest Android vector graphic launchers. #5571

New issue

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

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

Already on GitHub? Sign in to your account

Closed
LaKing opened this issue May 3, 2021 · 5 comments · Fixed by #5667

Comments

@LaKing
Copy link

LaKing commented May 3, 2021

Environment
zsh on macOS Catalina 10.15.7

✔ Component nativescript has 8.0.1 version and is up to date.
✔ Component @nativescript/core has 8.0.3 version and is up to date.
✖ Component @nativescript/ios is not installed.
✔ Component @nativescript/android has 8.0.0 version and is up to date.

Describe the bug
Created icon.png with 1024x1024 size.

tns resources generate icons ~/icon.png
Generating icons ...
Icons generation completed.

.. however, Android icons did not get created. Even when creating the mipmap icons, they don't get applied and the nativescript icon is associated with the app. No error messages.
Splashes are generated correctly.

Expected behavior
The launcher icon should be generated from the image.

@LaKing
Copy link
Author

LaKing commented May 4, 2021

I've managed to create a launcher icon directly from SVG. ...

Here are the steps:
Open Android Studio, create a new app.
Open the menu on the app folder, New > Vector Asset.
Save the vector graphic as ic_*.xml file.
Replace /App_Resources/Android/src/main/res/drawable/ic_launcher_foreground.xml with your xml.

A bit hackerish, but it works. ....

@LaKing LaKing changed the title Android Launcher Icon stays at the default after running tns resources generate icons tns resources generate icons - cli script update needed to support latest Android vector graphic launchers. May 4, 2021
@vallemar
Copy link
Contributor

same error here

@coolboy0961
Copy link

me too

@pierreamgabriel
Copy link

Same here. Icons are not being created by tns resources.

@rigor789 rigor789 transferred this issue from NativeScript/NativeScript Sep 11, 2021
@rigor789 rigor789 changed the title tns resources generate icons - cli script update needed to support latest Android vector graphic launchers. ns resources generate icons - cli script update needed to support latest Android vector graphic launchers. Sep 11, 2021
@joshcomley
Copy link

Any update on this? Or is there an alternative way to generate icons?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants