No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Cordova build not loading statics

    Help
    7
    10
    3937
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sergiuwd last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • S
        sergiuwd last edited by

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

        1 Reply Last reply Reply Quote 0
        • rstoenescu
          rstoenescu Admin last edited by

          Hi, Have you read this? http://quasar-framework.org/guide/app-handling-static-assets.html

          1 Reply Last reply Reply Quote 0
          • S
            sergiuwd last edited by sergiuwd

            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

            1 Reply Last reply Reply Quote 0
            • O
              okmkey45 last edited by

              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?

              J 1 Reply Last reply Reply Quote 0
              • J
                JCharante @okmkey45 last edited by

                @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/)

                dan-leech 1 Reply Last reply Reply Quote 0
                • dan-leech
                  dan-leech @JCharante last edited by

                  @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 1 Reply Last reply Reply Quote 0
                  • dan-leech
                    dan-leech @dan-leech last edited by

                    @dan-leech I have fixed it. Cordova just cashed old build. cordova clean android
                    quasar clean does not work

                    1 Reply Last reply Reply Quote 1
                    • J
                      João Reck last edited by João Reck

                      Its work for me “…/statics/teamwork.png”, insert “.” to back a root folder. I hope it helps !!!

                      gvorster 1 Reply Last reply Reply Quote 1
                      • gvorster
                        gvorster @João Reck last edited by

                        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)

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post