App crashing Cordova-android 11
See original GitHub issueBug Report
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Problem
Application crash on startup
What is expected to happen?
Application should work after change Cordova-android-11 with target sdk 32
What does actually happen?
Application crash on startup
App not compile
Fixed using
After add implementation 'androidx.work:work-runtime:2.7.0-alpha05'
to cordovaLib-> build.gradle file application works
Version information
Ionic:
Ionic CLI : 6.20.1 (/Users/bhuminbhandari/.nvm/versions/node/v14.15.4/lib/node_modules/@ionic/cli)
Ionic Framework : ionic-angular 3.9.10
@ionic/app-scripts : 3.2.3
Cordova:
Cordova CLI : 11.0.0
Cordova Platforms : android 11.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 22 other plugins)
Utility:
cordova-res (update available: 0.15.4) : 0.15.0
native-run : 1.6.0
System:
Android SDK Tools : 26.1.1 (/Users/bhuminbhandari/Library/Android/sdk)
ios-sim : 8.0.2
NodeJS : v14.15.4 (/Users/bhuminbhandari/.nvm/versions/node/v14.15.4/bin/node)
npm : 6.14.10
OS : macOS Monterey
Xcode : Xcode 13.4.1 Build version 13F100
CDV-gradle
"MIN_SDK_VERSION": 25,
"SDK_VERSION": 32,
"COMPILE_SDK_VERSION": 32,
"GRADLE_VERSION": "7.4.2",
"MIN_BUILD_TOOLS_VERSION": "32.0.0",
"AGP_VERSION": "7.2.1",
"KOTLIN_VERSION": "1.5.21",
"ANDROIDX_APP_COMPAT_VERSION": "1.4.2",
"ANDROIDX_WEBKIT_VERSION": "1.4.0",
"ANDROIDX_CORE_SPLASHSCREEN_VERSION": "1.0.0-rc01",
"GRADLE_PLUGIN_GOOGLE_SERVICES_VERSION": "4.3.8",
"IS_GRADLE_PLUGIN_GOOGLE_SERVICES_ENABLED": true,
"IS_GRADLE_PLUGIN_KOTLIN_ENABLED": false
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Android 11 : App crashed while opening a Camera inside the ...
My app is based on sencha touch and cordova. it's a hybrid app where We use camera to take a picture and attached...
Read more >Cordova app crashes after I touch the screen with targetSdk 30
I am using cordova-android@10.0.0 to build the app. Though the app gets built successfully and also gets installed on the device.
Read more >App Center Crashes for Apache Cordova - Microsoft Learn
App Center Crashes will automatically generate a crash log every time your app crashes. The log is first written to the device's storage...
Read more >Camera Plugin Released! - Apache Cordova
The 5.0.2 patch release fixes a bug on Android. After taking a picture with the camera plugin on Android, the app could occasionally...
Read more >App crashes on start - Ionic Forum
My app (Ionic 5 + Cordova 9.1.0) crashes when I try to start it on an Android 11 phone. When I look into...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If building on a blank cordova project works, then I’ll try to let Cordova build the native project from scratch. Easiest way to do this is by removing the platform and re-adding it again, as noted in my above comment. Also if you were upgrading plugins, it might be best to remove them then re-add them as well, that way the native project gets configured from a clean slate.
This is something plugins need to fix because is an SDK 32 requirement. I see @havesource/cordova-plugin-push have already fixed it, but hasn’t released the fix to npm yet.