I have upgraded cordova-android to version 11 to support API Level 31 or above but when I'm creating build its giving error Cannot read property 'find' of null
I have done changes as suggested here Migrating to Cordova-Android 11 in Config.xml
<preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/android/icon/drawable-xxxhdpi-icon.png" />
removed all <splash>
tags and
uninstalled
cordova-plugin-splashscreen
and
cordova-plugin-androidx-adapter
still getting the error , please help
I've faced the same problem. As suggest here, it was caused by some plugins.
In my case, the plugins was : cordova-plugin-telerik-imagepicker phonegap-plugin-barcodescanner
They're not actually maintain anymore, so i had to use those forks, both for the same guy : https://github.com/geraldapeoples/phonegap-plugin-barcodescanner https://github.com/geraldapeoples/ImagePicker
It's not really a good practice to use forked plugin, but i can't found other working plugin that do the job properly, and don't have the time neither skill to dev a new one by myself.
Migrate to cordova-android 11 is not an easy path, but the doc advised above by Cristian Zumelzu cover most of the problems i met.
im added this to my config.xml and it works!!
<platform name="android">
...
<config-file parent="/resources" target="app/src/main/res/values/themes.xml">
<style name="Theme.App.SplashScreen" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">#FFFFFF</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/notification_icon.png</item>
<item name="windowSplashScreenBrandingImage">@drawable/notification_icon.png</item>
<item name="windowSplashScreenIconBackgroundColor">#FFFFFF</item>
<item name="windowSplashScreenAnimationDuration">1000</item>
<item name="postSplashScreenTheme">@style/MyTheme</item>
</style>
</config-file>
...
</platform>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With