Cordova build not loading statics
-
I just ran into this problem: I am loading images using
src="statics/logo.jpg"
and when I runquasar dev
, the images are displaying just fine, but when I build the APK usingcordova build android
, the images are not displayed on the device. What can be wrong? -
Tried moving the images to
/assets
, didn’t work either. -
Hi, Have you read this? http://quasar-framework.org/guide/app-handling-static-assets.html
-
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 runningcordova 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 runcordova build
(to build the apk based off of the contents in/cordova/www/
aka/dist/
) -
@jcharante Could you explain in details what I have to do with config and which config to make statics work in cordova app?
With cordova dev all works fine, but does not with build. -
@dan-leech I have fixed it. Cordova just cashed old build.
cordova clean android
quasar clean
does not work -
Its work for me “…/statics/teamwork.png”, insert “.” to back a root folder. I hope it helps !!!
-
background-image: url("../statics/textures/texture2.png");
in app.scss is also the only thing that works for me in both dev and prod (cordova/android)