Monday 7 December 2020

Cordova Android app force closes after build

Here's the error details:

12-04 22:00:12.087: E/AndroidRuntime(19113): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.package.name.dev/com.package.name.dev.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CordovaPlugin.privateInitialize(java.lang.String, org.apache.cordova.CordovaInterface, org.apache.cordova.CordovaWebView, org.apache.cordova.CordovaPreferences)' on a null object reference

Background: I was originally only building the app for Android, but during my last release I had to generate an iOS build as well, which required some extra plugins and configuration tweaks to get functional. Now I'm trying to create a new release for Android, but the new app force closes as soon as it is opened.

In an effort to fix it, I tried to remove all references to the iOS-only plugins from the Android side of the project, but the error persists. I'm not sure what else to try.

What would provoke Cordova to throw this error when initializing plugins?



from Cordova Android app force closes after build

No comments:

Post a Comment