after several twists and turns, the apk
file is finally packaged through cordova
. However, when it is installed on the phone, it is found that a blank page is displayed.
for a long time, I unzipped the apk and opened the assets\ www
under the index.html
file, and found two problems:
-
The js file referenced in
index.html
does not match the packaged filehash
(mainly because part of the js file hash does not match); -
The css and js referenced in
index.html
are repeated (twice);
formatted index.html:
npm run build
index.html
css
js
apk~~~
:
:apkcordova serve android
http://localhost:8000/android/www/index.html
android
:appcssjs...