Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Any changes to the code are not reflected on the build apk.



  • Hello all,
    I’m trying to make an application using onsen with vue.js and cordova.
    I installed all java dependencies to my mac, I made a new project using monaca cli tool, I entered the www folder and wrote some code.
    By using

    monaca preview
    

    The browser shows the app I made, but when I do

    cordova build android
    

    The .apk extracted does not reflect the changes I made to the code.

    What happens?


  • Monaca

    @Terumi
    You need to run npm run build:watch while making changes to your app. This command will update your source files under www folder which will then be used to build your app later.


  • Onsen UI

    @Terumi @khemry To be more precise, your source files are under src folder. You should not modify www folder because those are automatically generated files. While developing, monaca preview will cache your files in memory but it will not generate files in the disk. Therefore, whenever you want to build locally using Cordova, you need to generate the files by running monaca transpile.

    If you used Vue CLI to create the project instead of Monaca CLI, then you’ll need to run npm run dev instead of monaca preview and npm run build instead of monaca transpile.