Unable to open asset URL: file:///android_asset/cordova.js



  • HI,
    i am trying to run quasar project from my android app.

    i have a quasar project and i build it successfully. after build i copy all the files from dist folder to android assets folder and i set all the webview settings in android file. but when i run the app i got the error

    Unable to open asset URL: file:///android_asset/cordova.js

    can you plz help me.



  • @Sujan-Dev

    You mentioned you copied the files from dist/ to the assets folder? Do you mean cordova/www/ by that? It isn’t too important, because you should run $ quasar wrap cordova to link them together so you don’t have to copy them manually.

    I don’t know why you modified your index.html file to set the location of cordova.js to somewhere else, as it’ll be generated + included automatically when running (while in the cordova/ directory) $ cordova run or $ cordova build

    Docs for Quasar w/ Cordova



  • @JCharante

    thanks for your reply. i found the files in cordova/assets/www folder


  • Admin

    You shouldn’t include or directly import cordova by yourself. Quasar does this automatically and you got a global cordova object available.



  • @rstoenescu thanks. i used the files from cordova/assets/www after cordova build.


  • Admin

    No need to import that. They get injected by default. Part of how Cordova works.


Log in to reply
 

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