'Cordova 9.1 Android Application white screen for Android 10- (works for Android 10 +)
I created a small angular application where I added Cordova to generate a web and android application.
Everything was ok when I used angular version 6 and Cordova-android version 8.
Some weeks ago, I updated the versions of my application to use Angular 13 and Cordova-android 9.1.
The problem in production is that the application only works for sdkversion 29+.
I don't have any error when I debug the application.
Can someone help me?
More information:
package.json
{
"name": "myApp",
"displayName": "myApp",
"version": "1.5.5",
"description": "myApp description",
"main": "index.js",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"keywords": [
"ecosystem:cordova"
],
"author": "Apache Cordova Team",
"license": "Apache-2.0",
"dependencies": {
"@angular/animations": "~13.1.0",
"@angular/cdk": "^13.1.1",
"@angular/common": "~13.1.0",
"@angular/compiler": "~13.1.0",
"@angular/core": "~13.1.0",
"@angular/forms": "~13.1.0",
"@angular/material": "^13.1.1",
"@angular/platform-browser": "~13.1.0",
"@angular/platform-browser-dynamic": "~13.1.0",
"@angular/router": "~13.1.0",
"bootstrap": "^4.3.1",
"cordova-android": "^9.1.0",
"jquery": "^3.3.1",
"material-design-icons": "^3.0.1",
"rxjs": "~7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4",
"core-js": "^2.5.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.1.2",
"@angular/cli": "~13.1.2",
"@angular/compiler-cli": "~13.1.0",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-whitelist": "^1.3.4",
"jasmine-core": "~3.10.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.1.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.5.2"
},
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {}
},
"platforms": [
"android"
]
}
}
config.xml:
<?xml version="1.0" encoding="utf-8" ?>
<widget id="io.cordova.myApp" version="1.5.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>MyApp</name>
<description>
MyApp description
</description>
<author email="[email protected]" href="http://cordova.io">
MyApp Owner
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<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="loadUrlTimeoutValue" value="145000" />
<platform name="android">
<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="30" />
<icon src="/src/assets/icon_36.png" density="ldpi" />
<icon src="/src/assets/icon_48.png" density="mdpi" />
<icon src="/src/assets/icon_72.png" density="hdpi" />
<icon src="/src/assets/icon_96.png" density="xhdpi" />
<icon src="/src/assets/icon_144.png" density="xxhdpi" />
<icon src="/src/assets/icon_192.png" density="xxxhdpi" />
<preference name="loadUrlTimeoutValue" value="100000" />
</platform>
</widget>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|