Ionic Apk does not work. White screen

Asked

Viewed 2,726 times

2

Good morning, I created an application in Ionic, it works perfectly, when I use

ionic serve

Ionic can generate Build without any error, but after installing apk only the header appears and then a white screen. someone has already been through this and managed to solve?

2 answers

1

There is probably some dependency on your app that is not being loaded and thus generating an error and stopping the correct app loading.

If your application performs ajax requests, it is possible that it is capturing a 404 response when trying to execute such requests. This problem is solved by installing the Cordova-Whitelist-plugin.

I recommend that you list the plugins of Cordova installed in your application by typing in the terminal: cordova plugin list or ionic plugin list. Most Cordova plugins must be registered in the app.js in order to be loaded by Ionic.

Finally, there is the option for you to simulate your application on an android or iOS device and use a monitoring to check the error log.

If your device is android just plug an android device into the USB and run the command monitor which is inside the Android SDK.

If your device is iOS, just use Xcode.

0

Make sure Voce has the plugin installed:

ionic cordova plugin add cordova-plugin-splashscreen

npm install --save @ionic-native/splash-screen

After that , Inside config.xml put that line

<preference name="AutoHideSplashScreen" value="false" />

In my case this solution took effect (Credits).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.