Unfortunately app has stopped (emulator and device - android)

What’s causing this?

Here’s the adb logcat:

--------- beginning of main
E/lowmemorykiller(    0): Kernel does not support memory pressure events or in-kernel low memory killer
--------- beginning of system
E/SurfaceFlinger(  937): hwcomposer module not found
E/SurfaceFlinger(  937): ro.sf.lcd_density must be defined as a build property
E/BandwidthController(  944): runIptablesCmd(): res=1 status=256 failed /system/bin/iptables -A bw_INPUT -m owner --socket-exists
E/BandwidthController(  944): runIptablesCmd(): res=1 status=256 failed /system/bin/ip6tables -A bw_INPUT -m owner --socket-exists
E/logwrapper( 1214): executing /system/bin/ip failed: No such file or directory
E/Netd    (  944): failed to flush rules
E/CommandListener(  944): failed to initialize RouteController (Remote I/O error)
E/memtrack(  951): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug(  951): failed to load memtrack module: -2
E/audio_hw_generic(  948): Error opening input stream format 1, channel_mask 0010, sample_rate 16000
E/AudioFlinger(  948): int android::load_audio_interface(const char*, audio_hw_device_t**) couldn't load audio hw module audio.r_submix (No such file or directory)
E/SoundTriggerHwService(  948): couldn't load sound trigger module sound_trigger.primary (No such file or directory)
E/AudioFlinger(  948): no wake lock to update!
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansGujarati-Regular.ttf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansGujarati-Bold.ttf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansGujaratiUI-Regular.ttf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansGujaratiUI-Bold.ttf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansGurmukhi-Regular.ttf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansGurmukhi-Bold.ttf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansGurmukhiUI-Regular.ttf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansGurmukhiUI-Bold.ttf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansSinhala-Regular.ttf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansSinhala-Bold.ttf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansCherokee-Regular.ttf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansCanadianAboriginal-Regular.ttf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansYi-Regular.ttf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansHans-Regular.otf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansHant-Regular.otf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansJP-Regular.otf
E/Minikin (  951): addFont failed to create font /system/fonts/NotoSansKR-Regular.otf
E/EmojiFactory_jni(  951): Failed to load libemoji.so: dlopen failed: library "libemoji.so" not found
E/PowerManagerService-JNI( 1240): Couldn't load power module (No such file or directory)
E/SurfaceFlinger(  937): ro.sf.lcd_density must be defined as a build property
E/ConsumerIrService( 1240): Can't open consumer IR HW Module, error: -2
E/EventHub( 1240): could not get driver version for /dev/input/mouse0, Not a typewriter
E/EventHub( 1240): could not get driver version for /dev/input/mice, Not a typewriter
E/WifiConfigStore( 1240): associatedPartialScanPeriodMilli set to 10000
E/Fingerprint-JNI( 1240): Can't open fingerprint HW Module, error: -2
E/SQLiteLog( 1240): (283) recovered 16 frames from WAL file /data/system/locksettings.db-wal
E/libprocessgroup( 1308): failed to make and chown /acct/uid_1037: Read-only file system
E/libprocessgroup( 1323): failed to make and chown /acct/uid_10012: Read-only file system
E/BluetoothAdapter( 1240): Bluetooth binder is null
E/BluetoothAdapter( 1240): Bluetooth binder is null
E/InputMethodManagerService( 1240): Ignoring setImeWindowStatus due to an invalid token. uid:1000 token:null
E/libprocessgroup( 1355): failed to make and chown /acct/uid_10030: Read-only file system
E/WVMExtractor(  948): Failed to open libwvm.so: dlopen failed: library "libwvm.so" not found
E/libprocessgroup( 1379): failed to make and chown /acct/uid_10005: Read-only file system
E/GpsLocationProvider( 1240): no AGPS interface in set_agps_server
E/GpsLocationProvider( 1240): no GPS configuration interface in configuraiton_update
E/LocationManagerService( 1240): no geocoder provider found
E/FlpHardwareProvider( 1240): Error hw_get_module 'flp': -2
E/LocationManagerService( 1240): FLP HAL not supported
E/LocationManagerService( 1240): Unable to bind FLP Geofence proxy.
E/ActivityRecognitionHardware( 1240): Error hw_get_module: -2
E/LocationManagerService( 1240): Hardware Activity-Recognition not supported.
E/GpsLocationProvider( 1240): no AGPS interface in set_agps_server
E/libprocessgroup( 1403): failed to make and chown /acct/uid_1001: Read-only file system
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/libprocessgroup( 1424): failed to make and chown /acct/uid_1001: Read-only file system
E/libprocessgroup( 1441): failed to make and chown /acct/uid_1001: Read-only file system
E/libprocessgroup( 1457): failed to make and chown /acct/uid_10007: Read-only file system
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/libprocessgroup( 1487): failed to make and chown /acct/uid_10039: Read-only file system
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000101a
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000100e
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000100e
E/OMXNodeInstance(  948): OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000100e
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000100e
E/OMXNodeInstance(  948): OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000100e
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000100e
E/OMXNodeInstance(  948): OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000100e
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000100e
E/OMXNodeInstance(  948): OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000100e
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000100e
E/OMXNodeInstance(  948): OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000100e
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000100e
E/OMXNodeInstance(  948): OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000100e
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000100e
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000100e
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000100e
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000100e
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000100e
E/OMXNodeInstance(  948): getParameter(100663311) ERROR: 0x8000100e
E/OMXNodeInstance(  948): getParameter(100663297) ERROR: 0x8000100e
E/libprocessgroup( 1591): failed to make and chown /acct/uid_10002: Read-only file system
E/BluetoothAdapter( 1424): Bluetooth binder is null
E/SQLiteLog( 1379): (283) recovered 77 frames from WAL file /data/data/com.android.providers.media/databases/external.db-wal
E/MmsService( 1441): MmsConfigManager.load -- empty getActiveSubInfoList
E/BluetoothAdapter( 1424): Bluetooth binder is null
E/libprocessgroup( 1619): failed to make and chown /acct/uid_10006: Read-only file system
E/libprocessgroup( 1639): failed to make and chown /acct/uid_10021: Read-only file system
E/libprocessgroup( 1670): failed to make and chown /acct/uid_10033: Read-only file system
E/BluetoothAdapter( 1323): Bluetooth binder is null
E/BluetoothAdapter( 1323): Bluetooth binder is null
E/libprocessgroup( 1703): failed to make and chown /acct/uid_1000: Read-only file system
E/memtrack( 1724): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1724): failed to load memtrack module: -2
E/art     ( 1724): Thread attaching while runtime is shutting down: Binder_1
E/libprocessgroup( 1737): failed to make and chown /acct/uid_10004: Read-only file system
E/BluetoothAdapter( 1441): Bluetooth binder is null
E/libprocessgroup( 1768): failed to make and chown /acct/uid_10001: Read-only file system
E/PhoneInterfaceManager( 1441): [PhoneIntfMgr] getIccId: ICC ID is null or empty.
E/gralloc_goldfish(  937): gralloc_alloc: Mismatched usage flags: 1200 x 1920, usage b33
E/        (  937): GraphicBufferAlloc::createGraphicBuffer(w=1200, h=1920) failed (Invalid argument), handle=0x0
E/BufferQueueProducer(  937): [ScreenshotSurface] dequeueBuffer: createGraphicBuffer failed
E/libprocessgroup( 1793): failed to make and chown /acct/uid_10008: Read-only file system
E/GpsLocationProvider( 1240): no AGPS interface in set_agps_server
E/GpsLocationProvider( 1240): no GPS configuration interface in configuraiton_update
E/SQLiteLog( 1379): (283) recovered 50 frames from WAL file /data/data/com.android.providers.media/databases/internal.db-wal
E/GpsLocationProvider( 1240): no AGPS interface in set_agps_server
E/Netd    (  944): exec() res=0, status=256 for /system/bin/iptables -t mangle -A INPUT -i eth0 -j MARK --set-mark 0x30064 
E/Netd    (  944): exec() res=0, status=256 for /system/bin/ip6tables -t mangle -A INPUT -i eth0 -j MARK --set-mark 0x30064 
E/Netd    (  944): failed to change iptables rule that sets incoming packet mark
E/Netd    (  944): failed to add interface eth0 to netId 100
E/ConnectivityService( 1240): Exception adding interface: java.lang.IllegalStateException: command '10 network interface add 100 eth0' failed with '400 10 addInterfaceToNetwork() failed (Remote I/O error)'
E/Netd    (  944): interface eth0 not assigned to any netId
E/ConnectivityService( 1240): Exception in addRoute for gateway: java.lang.IllegalStateException: command '12 network route add 100 eth0 0.0.0.0/0 10.0.2.2' failed with '400 12 addRoute() failed (No such device)'
E/ConnectivityService( 1240): Exception in setupDataActivityTracking java.lang.IllegalStateException: command '14 idletimer add eth0 5 0' failed with '400 14 Failed to add interface'
E/GpsLocationProvider( 1240): no GPS configuration interface in configuraiton_update
E/GpsLocationProvider( 1240): no AGPS interface in set_agps_server
E/GpsLocationProvider( 1240): no GPS configuration interface in configuraiton_update
E/libprocessgroup( 1830): failed to make and chown /acct/uid_10009: Read-only file system
E/libprocessgroup( 1860): failed to make and chown /acct/uid_10017: Read-only file system
E/memtrack( 1885): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1885): failed to load memtrack module: -2
E/libprocessgroup( 1896): failed to make and chown /acct/uid_10003: Read-only file system
E/memtrack( 1917): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1917): failed to load memtrack module: -2
E/memtrack( 1929): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1929): failed to load memtrack module: -2
E/libprocessgroup( 1940): failed to make and chown /acct/uid_10053: Read-only file system
--------- beginning of crash
E/AndroidRuntime( 1940): FATAL EXCEPTION: main
E/AndroidRuntime( 1940): Process: com.ionicframework.allergiaapp355789, PID: 1940
E/AndroidRuntime( 1940): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ionicframework.allergiaapp355789/com.ionicframework.allergiaapp355789.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CordovaPlugin.privateInitialize(org.apache.cordova.CordovaInterface, org.apache.cordova.CordovaWebView, org.apache.cordova.CordovaPreferences)' on a null object reference
E/AndroidRuntime( 1940): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
E/AndroidRuntime( 1940): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
E/AndroidRuntime( 1940): 	at android.app.ActivityThread.access$800(ActivityThread.java:144)
E/AndroidRuntime( 1940): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
E/AndroidRuntime( 1940): 	at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1940): 	at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 1940): 	at android.app.ActivityThread.main(ActivityThread.java:5221)
E/AndroidRuntime( 1940): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 1940): 	at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 1940): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
E/AndroidRuntime( 1940): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
E/AndroidRuntime( 1940): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CordovaPlugin.privateInitialize(org.apache.cordova.CordovaInterface, org.apache.cordova.CordovaWebView, org.apache.cordova.CordovaPreferences)' on a null object reference
E/AndroidRuntime( 1940): 	at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:195)
E/AndroidRuntime( 1940): 	at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:116)
E/AndroidRuntime( 1940): 	at org.apache.cordova.PluginManager.init(PluginManager.java:92)
E/AndroidRuntime( 1940): 	at org.apache.cordova.CordovaWebView.init(CordovaWebView.java:163)
E/AndroidRuntime( 1940): 	at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:345)
E/AndroidRuntime( 1940): 	at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:320)
E/AndroidRuntime( 1940): 	at com.ionicframework.allergiaapp355789.MainActivity.onCreate(MainActivity.java:31)
E/AndroidRuntime( 1940): 	at android.app.Activity.performCreate(Activity.java:5933)
E/AndroidRuntime( 1940): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
E/AndroidRuntime( 1940): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
E/AndroidRuntime( 1940): 	... 10 more
E/ActivityManager( 1240): Invalid thumbnail dimensions: 720x720
E/libprocessgroup( 1981): failed to make and chown /acct/uid_10025: Read-only file system
E/libprocessgroup( 2003): failed to make and chown /acct/uid_10027: Read-only file system
E/ActivityThread( 1981): Service com.android.email.service.EmailBroadcastProcessorService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@19cdec26 that was originally bound here
E/ActivityThread( 1981): android.app.ServiceConnectionLeaked: Service com.android.email.service.EmailBroadcastProcessorService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@19cdec26 that was originally bound here
E/ActivityThread( 1981): 	at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:1070)
E/ActivityThread( 1981): 	at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:964)
E/ActivityThread( 1981): 	at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1768)
E/ActivityThread( 1981): 	at android.app.ContextImpl.bindService(ContextImpl.java:1751)
E/ActivityThread( 1981): 	at android.content.ContextWrapper.bindService(ContextWrapper.java:538)
E/ActivityThread( 1981): 	at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:176)
E/ActivityThread( 1981): 	at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:219)
E/ActivityThread( 1981): 	at com.android.email.service.EmailServiceUtils.isServiceAvailable(EmailServiceUtils.java:160)
E/ActivityThread( 1981): 	at com.android.email.provider.AccountReconciler.reconcileAccountsInternal(AccountReconciler.java:164)
E/ActivityThread( 1981): 	at com.android.email.provider.AccountReconciler.reconcileAccounts(AccountReconciler.java:113)
E/ActivityThread( 1981): 	at com.android.email.service.EmailBroadcastProcessorService.reconcileAndStartServices(EmailBroadcastProcessorService.java:305)
E/ActivityThread( 1981): 	at com.android.email.service.EmailBroadcastProcessorService.onBootCompleted(EmailBroadcastProcessorService.java:295)
E/ActivityThread( 1981): 	at com.android.email.service.EmailBroadcastProcessorService.onHandleIntent(EmailBroadcastProcessorService.java:130)
E/ActivityThread( 1981): 	at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/ActivityThread( 1981): 	at android.os.Handler.dispatchMessage(Handler.java:102)
E/ActivityThread( 1981): 	at android.os.Looper.loop(Looper.java:135)
E/ActivityThread( 1981): 	at android.os.HandlerThread.run(HandlerThread.java:61)
E/StrictMode( 1981): null
E/StrictMode( 1981): android.app.ServiceConnectionLeaked: Service com.android.email.service.EmailBroadcastProcessorService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@19cdec26 that was originally bound here
E/StrictMode( 1981): 	at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:1070)
E/StrictMode( 1981): 	at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:964)
E/StrictMode( 1981): 	at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1768)
E/StrictMode( 1981): 	at android.app.ContextImpl.bindService(ContextImpl.java:1751)
E/StrictMode( 1981): 	at android.content.ContextWrapper.bindService(ContextWrapper.java:538)
E/StrictMode( 1981): 	at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:176)
E/StrictMode( 1981): 	at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:219)
E/StrictMode( 1981): 	at com.android.email.service.EmailServiceUtils.isServiceAvailable(EmailServiceUtils.java:160)
E/StrictMode( 1981): 	at com.android.email.provider.AccountReconciler.reconcileAccountsInternal(AccountReconciler.java:164)
E/StrictMode( 1981): 	at com.android.email.provider.AccountReconciler.reconcileAccounts(AccountReconciler.java:113)
E/StrictMode( 1981): 	at com.android.email.service.EmailBroadcastProcessorService.reconcileAndStartServices(EmailBroadcastProcessorService.java:305)
E/StrictMode( 1981): 	at com.android.email.service.EmailBroadcastProcessorService.onBootCompleted(EmailBroadcastProcessorService.java:295)
E/StrictMode( 1981): 	at com.android.email.service.EmailBroadcastProcessorService.onHandleIntent(EmailBroadcastProcessorService.java:130)
E/StrictMode( 1981): 	at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/StrictMode( 1981): 	at android.os.Handler.dispatchMessage(Handler.java:102)
E/StrictMode( 1981): 	at android.os.Looper.loop(Looper.java:135)
E/StrictMode( 1981): 	at android.os.HandlerThread.run(HandlerThread.java:61)
E/SQLiteLog( 1768): (284) automatic index on view_events(_id)
E/libprocessgroup( 2036): failed to make and chown /acct/uid_10038: Read-only file system

Can you run inside a browser?

Are you sure all the plugins you’re using are actually installed in the platform folders?

Yes, it does work in browser. All 4 plugins are there “\platforms\android\assets\www\plugins”.

  • com.ionic.keyboard
  • org.apache.cordova.device
  • org.apache.cordova.splashscreen
  • org.apache.cordova.statusbarDelete

Just wondering if that reference to org.apache.cordova.CordovaPreferences needs a plugin?

http://ngcordova.com/docs/plugins/preferences/

same here, solutions?

@eno tried to install the plugin without help

Im assuming you rebuilt anfd re-tested after installing any new plugin?

I did not, so you suggest to remove every plugin, to make sure it’s not because of the plugins?

Understand that adding plugins simply adds it into your project files but doesn’t rebuild the app to include them unless you rebuild your app afterwards as well.

made it work, finally!

to debug I put two lines on platforms/android/CordovaLib/src/org/apache/cordova/PluginManager.java before privateInitialize call:

195             Log.w(TAG, "--------------------------------------");
196             Log.w(TAG, "plugin: "+pe.pluginClass);
197             ret.privateInitialize(ctx, app, app.getPreferences());

Then I would run for each plugin that was printed on adb logcat:

ionic plugin remove plugin
ionic plugin add plugin

I guess the problem is related to the plugin load order.

the problem happened again after ionic platform remove android and ionic platform add android, had to remove/add plugins again.

Maybe platform add is not adding plugins correctly

Annoying bug

Actually we are coming to the same conclusion: namely that the order of how plugins are loaded makes a difference. In our case, we have found adding and removing platforms to be completely unreliable. Im wondering if some of these are perhaps installed asynchronously and causing problems (if that’s true, then the various JavaScript-based tools are a poor choice as build tools). Ive been in software development for over 20 years and Ive never come across a development environment as crazy as this. We have to add/remove a couple plugins every time I have to remove and add a platform…

1 Like