0
votes

I followed the ionic start and created a simple app. When I am trying ionic serve app opens in browser and I am to see the home and list of items. When I am trying ionic cordova build android , build get success and apk gets created inside platforms/android/… path. After installing this apk on an android emulator or device, when I opens the app, it crashes and android shows Open again popup message.

I do not know what is the problem here. Please help.

Below are some info -

>ionic info

Ionic:

ionic (Ionic CLI) : 4.6.0 (C:\Users\1231083\AppData\Roaming\npm\node_modules\ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.1

Cordova:

cordova (Cordova CLI) : 8.1.2 ([email protected]) Cordova Platforms : android 7.1.2 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 4 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Users\1231083\AppData\Local\Android\Sdk) NodeJS : v10.11.0 (C:\Program Files\nodejs\node.exe) npm : 6.5.0 OS : Windows 7

>ionic cordova plugin ls com.salesforce 7.0.0 "SalesforceMobileSDK Plugins" cordova-plugin-device 2.0.2 "Device" cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard" cordova-plugin-ionic-webview 2.3.1 "cordova-plugin-ionic-webview" cordova-plugin-splashscreen 5.0.2 "Splashscreen" cordova-plugin-statusbar 2.4.2 "StatusBar" cordova-plugin-whitelist 1.2.0 "Whitelist"

1
Have you installed Forcedroid? npmjs.com/package/forcedroidAlex Steinberg
What exactly do you mean by crashing. Does the splash screen show? Are you getting any errors or just the "white screen of death"? Also have you used the Chrome Inspector to check for any errors inside your WebView?andypotato

1 Answers

0
votes

I get the same problem maybe in some cases you might try with

$ ionic cordova platform rm android

$ ionic cordova platform add android

this works in some cases