ATaysikuu opened a new issue, #1479:
URL: https://github.com/apache/cordova-android/issues/1479
# Bug Report
## Problem
Using Cordova 11 to target Android 12 fails to build.
### What is expected to happen?
The app should compile.
### What does actually happen?
Build crashes during the platform add android@11 with the following error:
```
Cannot read property 'find' of null
TypeError: Cannot read property 'find' of null
at
C:\Jenkins\workspace\REDACTEDPROJECTNAME\node_modules\cordova-android\lib\prepare.js:387:49
at Array.forEach (<anonymous>)
at updateProjectSplashScreen
(C:\Jenkins\workspace\REDACTEDPROJECTNAME\node_modules\cordova-android\lib\prepare.js:384:7)
at updateProjectAccordingTo
(C:\Jenkins\workspace\REDACTEDPROJECTNAME\node_modules\cordova-android\lib\prepare.js:269:5)
at
C:\Jenkins\workspace\REDACTEDPROJECTNAME\node_modules\cordova-android\lib\prepare.js:67:21
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Promise.all (index 0)
[ERROR] An error occurred while running subprocess cordova.
cordova platform add android@11 --verbose --save exited with exit
code 1.
Re-running this command with the --verbose flag may provide more
information.
```
## Information
<!-- Include all relevant information that might help understand and
reproduce the problem -->
config.xml:
`<?xml version='1.0' encoding='utf-8'?>
<widget id="com.COMPANY.CLIENTNAMEmobiledev" version="0.6.0"
xmlns="http://www.w3.org/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>CLIENTNAME-DEV</name>
<description>CLIENTNAME-DEV</description>
<author email="[email protected]"
href="https://www.COMPANY.com/">COMPANY</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="ScrollEnabled" value="false" />
<preference name="AndroidXEnabled" value="true" />
<preference name="android-minSdkVersion" value="23" />
<preference name="android-targetSdkVersion" value="32" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="KeyboardResizeMode" value="ionic" />
<hook src="hooks/after_prepare.js" type="after_prepare"/>
<platform name="android">
<resource-file src="firebase-services-dev.json"
target="app/google-services.json" />
<resource-file src="www/icon.png"
target="app/src/main/res/drawable/icon.png" />
<allow-intent href="market:*" />
<edit-config file="AndroidManifest.xml" mode="merge"
target="/manifest/application/activity">
<activity android:windowSoftInputMode="adjustPan"
android:exported="true" />
</edit-config>
<icon density="ldpi"
src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi"
src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi"
src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi"
src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi"
src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi"
src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<preference name="AndroidWindowSplashScreenAnimatedIcon"
value="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<plugin name="cordova-plugin-camera" spec="^4.0.2" />
<plugin name="cordova-plugin-filechooser" spec="^1.0.1" />
<plugin name="com-badrit-base64" spec="^0.2.0" />
<plugin name="com.telerik.plugins.nativepagetransitions" spec="^0.6.5" />
<plugin name="cordova-plugin-filepath" spec="^1.2.0" />
<plugin name="cordova-plugin-document-viewer" spec="^0.9.9" />
<plugin name="cordova-plugin-datepicker" spec="^0.9.3" />
<plugin name="cordova-plugin-file-opener2" spec="^2.0.19" />
<plugin name="cordova-plugin-x-socialsharing" spec="^5.4.0" />
<plugin name="cordova-plugin-actionsheet" spec="^2.3.3" />
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
<plugin name="cordova-plugin-screen-orientation" spec="^3.0.1" />
<plugin name="mx.ferreyra.callnumber" spec="~0.0.2" />
<plugin name="cordova-plugin-email-composer" spec="^0.8.15" />
<plugin name="cordova-plugin-ionic-webview" spec="^4.0.1">
<variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-plugin-ionic-webview" spec="4.0.1">
<variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-plugin-keychain-touch-id" spec="3.2.1" />
<preference name="GOOGLE_MAPS_ANDROID_API_KEY" value="REDACTED" />
<preference name="GOOGLE_MAPS_IOS_API_KEY" value="REDACTED" />
<plugin name="cordova-plugin-file" spec="6.0.2" />
<plugin name="cordova-plugin-filepicker" spec="^1.1.6" />
</widget>
`
### Command or Code
<!-- What command or code is needed to reproduce the problem? -->
`cordova platform add android@11 --verbose`
### Environment, Platform, Device
<!-- In what environment, on what platform or on which device are you
experiencing the issue? -->
Building an Ionic 3.9 app on Windows for Android 12 with Cordova 11.
### Version information
<!--
What are relevant versions you are using?
For example:
Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
Other Frameworks: Ionic Framework and CLI version
Operating System, Android Studio, Xcode etc.
-->
`
Cordova Packages:
cli: 11.0.0
common: 4.0.2
create: 4.0.0
lib: 11.0.0
common: 4.0.2
fetch: 3.0.1
serve: 4.0.0
`
`
Environment:
OS: Microsoft Windows 10 Business 10.0.19042 (19042) (Windows
10.0.19042) x64
Node: v14.18.1
npm: 6.14.15
`
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [ ] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [ ] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]