-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Adaptive Icon not working with cordova-android 12 #1616
Comments
Was able to reproduce the issue locally. I believe this is a regression from our #1550 update. I didn't notice it was an issue before since I have a Until a patch is made, I think there are two workarounds:
It isn't intended for monochrome icon to be required to use adaptive icons. So specifying just the |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Glad it works for you, and as a side effect you're more compliant with the android app ecosystem. But yah, the intended behaviour is to to require I don't know if I'll have time this weekend to look into it, but it is something I'm planning on tackling soon (perhaps the following weekend). |
@breautek is there any news regarding the icon? |
I'm also wondering, what would be the correct format for a "monochrome" PNG? Grayscale, indexed, or what? |
The monochrome should be the same as your foreground adaptive icon image, except it should only consist of two colours: an transparent background and pure black. Android will colour in the black pixels according to the user's configured Android theme. |
I also managed to get it working but had to search deep to find out how to put an extra monochrome icon since it's not documented yet. This is my config.xml with vector based adaptive icons: <icon foreground="xxx/ic_launcher_foreground.xml" background="xxx/ic_launcher_background.xml" monochrome="xxx/ic_launcher_monochrome.xml" density="XXX" src="xxx/XXX.png" /> The XML's are SVG's converted for android (Vector Drawable format, convert it here: https://svg2vector.com/ or in Android Studio ) |
Bug Report
Error:
"One of the following attributes are set but missing the other for the density type: mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi. Please ensure that all required attributes are defined."
Problem
The adaptive icon is missing the background and the foreground is small with cordova-android 12. The adaptive icon works properly with cordova-android 11.
What is expected to happen?
ic_launcher_background and ic_launcher_foreground assets are copied to the build.
What does actually happen?
Only ic_launcher is created and copied and not ic_launcher_background and ic_launcher_foreground.
Information
Config.xml
Command or Code
Environment, Platform, Device
Dev environment: Windows 10
Target platform: Android
Version information
cordova-android 12.0.0
cordova-cli 12
Checklist
The text was updated successfully, but these errors were encountered: