Create App
- Create directory where you maintain your code and create project. so open command prompt and perform the following commands.
- cordova create hello com.example.hello HelloWorld
- This creates the required directory structure for your cordova app. By default, the
cordova create
script generates a skeletal web-based application whose home page is the project'swww/index.html
file.
Add Platforms
2. Once you created project the next step is to add platform to your project. for that you have enter into project folder with the following command.
- cd hello
- once your entered into your project directory write this command in command prompt
- C:\users\sushant\hello> cordova platform add ios android --save
- C:\users\sushant\hello> cordova platform add android --save
- choose platform as per your requirement if you want to create project for android then add android platform & ios for iphone and so on. plus ensure they get saved to
config.xml.
- You can also check your current set of platforms
- C:\users\sushant\hello>cordova platform lsd
Build The App
3. By default cordova create command create web-based application structure whose start page is projects www/index.html file. Any initialization should be specified as part of the device ready event handler defined in www/js/index.js
- Run the following command to build the project for all platforms:
- C:\users\sushant\hello>cordova build
- You can build your app using CLI(command line interface) or use Android Studio IDE for building android app.
- So next blog i will learn you have to setup cordova project in Android Studio and how to build it and test mobile app on your android mobile.
No comments:
Post a Comment