I have cordova latest version installed on my system and I created the basic app with command
cordova create
and I added the platform using
cordova add platform android
and I replaced the default index.html in the www directory with my own index.html
but whenever i tried to generate apk, and tried to run it on my mobile. It was the apk generate with default index.html
the screen of my app will be
How to resolve this issue ?
This is a normal behaviour.
Cordova is going to take the index.html
from your projects root folder, everytime you run cordova build
, prepare
or serve
without attribues, which is located directly inside your projects www
folder.
Root www
folder inside your cordova project contains the index.html
which is taken and "thrown" into all platform folders when you run those commands.
projectName
-> www
-> index.html
Solution
cordova prepare
everytime after you did a change to your index.html
file.index.html
which is located inside the assets
-> www
folder