Reputation: 1140
I created a new cordova project (from the command line, cordova create firstProject com.examplefirstproject FirstProject
), then I added the platoform that I need (cordova platform add android
) and at this point I read from the Cordova documentation that I need to build the project (cordova build android
).
Why we need to build the project? I tried to emulate the project without building it and it works fine. So, I'm asking why I should run the command to build the project.
The "only difference" from a project where I run the build command is the presence of more folders in firstproject\platforms\android (here is the list of folders and files of the not builded project and here is the list of the builded project).
Upvotes: 0
Views: 49
Reputation: 108
The build command will recompile the app. There are many situations when this is important to do. Whenever, you make a change to core functionality of the app (not the HTML, JS, CSS etc), you will need to re-build the app for these changes to become apparent. Also, you will find when your project is finished, in order to publish the app you will have to build a release version of the app.
You don't need to build the app when you are merely editing the content of your app, which is what is causing your confusion it would seem.
It's also worth noting that when you use the 'run' command to emulate the app, this will also create a fresh build of the app.
Upvotes: 1