Android Build Icon Missing

I can’t seem to understand why I’m getting the default Cordova app icon for my Android build, when it is clearly defined in my config file. It works perfectly fine with my iOS build, but the Android icon is just the default Cordova icon. Do I need a specific plugin or am I missing something here? By the way, I’m not using any splashcreen or the plugin (I just need the icon). Here is how my preferences look like in config.xml (and yes, it is the right filepath, names and resolution):

Thank you in advance! :slight_smile:

Can’t upload the code bit for some reason, but here’s a screenshot:

We normally suggest that users automatically generate icons using cordova-res: Generating Icons and Splash Screens | VoltBuilder

However, if you’d rather not use that tool, there are a few things to check:

  1. Are the icons actually being included in your APK? (You should be able to use an archive tool to unzip it and look inside).
  2. Do the icons meet the Android icon size requirements?
            ldpi    : 36x36 px
            mdpi    : 48x48 px
            hdpi    : 72x72 px
            xhdpi   : 96x96 px
            xxhdpi  : 144x144 px
            xxxhdpi : 192x192 px

You can read more here: Customize App Icons - Apache Cordova

Hi,

Thank you for your message. I decided to try using Cordova-res first and it did in fact work, so thank you! However, I now have white space around my icon, which is initially not there on the original icon. How do I fix this? Should I make a resources.json file or is there an easier fix?

To add on that, the quality of the splashcreen image is very low as well, despite it being 8096x8096.

Are you able to share a screenshot of what you’re seeing, along with template you are using to generate the icon?

Android no longer supports splashscreens instead displaying an adaptive icon for the splashscreen. I suspect that your image might be too large, but it’s hard to say without seeing it myself.

This got really confusing - just to retry, I tried with an image of size 2000x2000 now, and not only did I get the same results, but I am also getting a splash screen of a different app of my own. I double checked and I downloaded the right .apk file. I’m attaching the actual icon and a screenshot of the app icon.

Screenshot_2023-11-20-18-04-47-918

In order to help, I will need you to share the exact images you are using, and what your config.xml and resources.json looks like.

I currently don’t have resources.json, as I thought it was optional (even though I tried to use it to fill in the white gaps, but it didn’t work, so I removed it), but here is what my config.xml looks like:

<?xml version="1.0" encoding="UTF-8"?>
<widget id="com.somewebsite.linkondropsV5" ios-CFBundleVersion="6" version="1.0.3" versionCode="10" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<preference name="phonegap-version" value="cli-8.0.0" />
<preference name="orientation" value="default" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="false" />
<preference name="webviewbounce" value="false" />
<preference name="android-build-tool" value="gradle" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
<preference name="AndroidExtraFilesystems" value="sdcard,cache" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#000000" />
<preference name="StatusBarStyle" value="lightcontent" />
<preference name="SplashScreenDelay" value="2000" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/splashTemplate.png" />
<preference name="AndroidWindowSplashScreenBackground" value="#000000" />
<feature name="http://api.phonegap.com/1.0/device" />
<feature name="debug-server" required="true">
   <param name="domain" value="http://debug.phonegap.com"/>
   <param name="key" value="nsmTechMobileV1"/>
</feature>
<plugin name="cordova-plugin-device" spec="2.0.3" />
<plugin name="cordova-plugin-device-motion" spec="2.0.1" />
<plugin name="cordova-plugin-device-orientation" spec="2.0.1" />
<plugin name="cordova-plugin-dialogs" spec="2.0.2" />
<plugin name="cordova-plugin-globalization" spec="1.11.0" />
<plugin name="cordova-plugin-inappbrowser" spec="4.0.0" />
<plugin name="cordova-plugin-network-information" spec="2.0.2" />
<plugin name="cordova-plugin-statusbar" spec="2.4.3" />
<plugin name="cordova-plugin-vibration" spec="3.1.1" />
<plugin name="cordova-plugin-androidx-adapter" />
<plugin name="cordova-plugin-geolocation" spec="~4">
    <variable name="GEOLOCATION_USAGE_DESCRIPTION" value="This app needs to access your location." />
</plugin>
<allow-navigation href="*://*.google.com/*" />
<allow-navigation href="*://*.googleapis.com/*" />
<allow-navigation href="*://*.gstatic.com/*" />
<allow-intent href="*://*.google.com/*" />
<allow-intent href="geo:*" />
<access origin="*://*.googleapis.com/*" subdomains="true" />
<access origin="*://*.gstatic.com/*" subdomains="true" />
<access origin="*://*.google.com/*" subdomains="true" />
<access origin="https://maps.google.com/*" />
<access origin="*://*.googleusercontent.com/*" subdomains="true" />
<access origin="cdvfile://*" />
<customHeaders>
    <add name="Access-Control-Allow-Origin" value="*" />
    <add name="Access-Control-Allow-Headers" value="Content-Type" />
    <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
</customHeaders>
<edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
    <string>This app needs camera access to take pictures.</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
    <string>This app needs photo library access to select existing pictures from.</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryAddUsageDescription">
    <string>This app needs photo library access to select existing pictures from.</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
    <string>This app needs to access your location.</string>
</edit-config>
<platform name="ios">
    <edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysAndWhenInUseUsageDescription">
        <string>This app needs to access your location.</string>
    </edit-config>
    <edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
        <string>This app needs to access your location.</string>
    </edit-config>
    <edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysUsageDescription">
        <string>This app needs to access your location.</string>
    </edit-config>
</platform>
<platform name="android">
    <uses-permission name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
</platform>

<name>Link-On Drops</name>
<description>Link-On Drops</description>
<author href="http://www.somewebsite.com" email="info@somewebsite.com">Some Website, Inc.</author>

I’ll also need to contents of your resources folder.

Here, and by the way, I don’t really need a splash screen, so if there’s a way to disable that, even better:

And here is the splash template (essentially same thing, just bigger):