Android 12 Splash Screen not working

The build log states: The “AndroidWindowSplashScreenAnimatedIcon” value does not exist. Cordova’s default will be used.

I have tried these in the config which both have no effect.

<preference name='AndroidWindowSplashScreenAnimatedIcon' value='resources/splashTemplate.png' />


<preference name='AndroidWindowSplashScreenAnimatedIcon' value='www/images/android12Splash.png' />

For the latter option I have placed android12Splash.png in my images folder and have also added images to ExtraFiles.

My mistake, its working now. I had mis-pelt the file name.

Hi, do u mind showing your whole config, I am having trouble on Android12 splash screen too. Thanks in advance, tst

There are a few different ways to do it but what I have done is create a new splashscreen image specifically for Android 12, 436x436 px.

For the actual image I used my app icon centered in the middle of the splashscreen image, ensure plenty of space around the icon and the splashscreen image so it doesn’t get cropped on different screen sizes.

I named that image android12splash.png. I created a new folder in my project folder and named it “images” and put the new splashscreen image in that folder.

In Project Explorer side bar menu > “Project Properties and Global Code”, scroll down to “extraFiles” and enter images (this is so the images folder will be included in the build).

Then in the VoltBuilder config.xml just put this:

<!-- Splash Screens -->
<plugin name='cordova-plugin-splashscreen' source='npm' />
<preference name='SplashScreenDelay' value='2000' />
<preference name='AutoHideSplashScreen' value='true' />
<preference name='AndroidWindowSplashScreenAnimatedIcon' value='www/images/android12splash.png' />
<preference name='AndroidWindowSplashScreenBackground' value='#FFFFFF' />
<preference name='AndroidWindowSplashScreenAnimationDuration' value='2000' />

Just for reference this is my Android spec in the config file:

<engine name="android" spec="11.0.0" />
<platform name="android" >
  <preference name="AndroidXEnabled" value="true" />
  <preference name="AndroidPersistentFileLocation" value="Internal" />
  <preference name="android-minSdkVersion" value="21" />
  <preference name="android-targetSdkVersion" value="31" />

Hope that helps.

Wow, your config file details really save my day! Thank you so much, now I really can have a nice sleep…