Cordova build not loading statics



  • I just ran into this problem: I am loading images using src="statics/logo.jpg" and when I run quasar dev, the images are displaying just fine, but when I build the APK using cordova build android, the images are not displayed on the device. What can be wrong?



  • Tried moving the images to /assets, didn’t work either.


  • Admin



  • Yes, and I tried ~statics/logo.jpg, statics/logo.jpg, /statics/logo.jpg and :src="statics/logo.jpg", nothing worked. I also tried moving the file to /assets



  • Hello. I´ve been having some issues too about cordova build. But not only with logos and images. When I generate the apk file and install it in the device, none of the changes are updated. Not even texts, labels, buttons, etc. Besides cordova build android, is there anything else I should do?



  • @okmkey45 If my understanding is correct, then let / be the root of your quasar project.

    /cordova/www/ is symlink to /dist/, and running cordova build will simply create an apk based on the contents of /cordova/www/.

    You first must run quasar build to generate the files for /dist/ (and therefor /cordova/www/), and then cd into your cordova directory to run cordova build (to build the apk based off of the contents in /cordova/www/ aka /dist/)


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.