My Ionic app works fine in browser but won't open in my phone

my ionic project works fine with ionic service --lab, but by copying the .apk file to the install folder on my phone and installing the app, but a blank screen appears,

Please ask someone what might be my problem.

My app uses google maps, the key is listed for both app and browser in index.html

+3


source to share


4 answers


Have you tried running it in the emulator? As it is much easier to see the error logs. Try the ionic emulator android -l or ios -l (whichever OS you are building) and then as soon as startup starts to launch command consoles it will log all activity and you will have a better understanding of why it is not working.



+1


source


+1 to use Chrome's remote debugging feature. It gives you the same result as when running the application in a browser.

Also, I've found that sometimes, if your application is already compiled, the ionic CLI doesn't always copy your current files to the APK, and uses the old cached files instead. If you're banging your head against the wall, run the following commands to make sure you have your latest code in your APK.



ionic platform remove android
ionic platform add android
ionic run android

      

+1


source


I suggest you use Chrome's Remote Debugging feature . I ran into the same and spent hours looking for answers to my symptom. Once I connected to the chrome remote debugger, I got the .log console and noticed that there was a problem in my routing setup.

0


source


This was a problem with the ionic CLI. I updated it to the latest and reinstalled all dependencies.

-1


source







All Articles