I am trying to convert my existing Angular 8 app to an android app using Cordova.I am following this tutorial.
But, I am getting a white screen when I install the signed and release build in a Android device.Any suggestion?
I am trying to convert my existing Angular 8 app to an android app using Cordova.I am following this tutorial.
But, I am getting a white screen when I install the signed and release build in a Android device.Any suggestion?
The following steps work for me
Install cordova globally
Go into the Angular project folder and run this
cordova create mobile
If there is not a folder inside your Angular project
folder called "dist", run this:
ng build
Change directory
cd mobile
Link the dist file with the www file. Run this command in cmd
as administrator
mklink /d "C:\Users\....\www" "C:\Users\....\dist"
Go to the parent directory (you should be in the Angular
project folder now) and run this:
ng build
Go to mobile\www\index.html and do this change
<base href="/"> --> <base href="./">
Go to the mobile directory (cd mobile) and run this
cordova platform add android
Connect the android phone and run this
cordova run android