Usually android program's are created using java program, but cordova is a framework to convert the HTML,CSS,JavaScript code to android program. So we can simply create the program through HTML,CSS,Javascript and easy to convert and work with android device. In the following steps we will learn about this.
Requirements:
1. You should install the Android Studio (for SDK)2.Download Latest JDK from google or JDK 8 here and install your chosen path (my installation location D:\Program Files\Java)
After install the node.js, open command prompt and type the following command
npm install -g cordova
now the cordova starts to install.
4. Open the SDK from android studio installed directory and update the latest versions (my installation location D:\Program Files\Android Studio\SDK\SDK Manager.exe).
Note:
Don't forget to install the "Intel x86 Emulator Accelerator (HAXM install)".
It may not installed automatically, so you need to go the android studio installed directory and \SDK\extras\intel\Hardware_Accelerated_Execution_Manager.
(my installed directory is D:\Program Files\Android Studio\SDK\extras\intel\Hardware_Accelerated_Execution_Manager) and install.
More Information
5. Check your BIOS settings, you should enable the "Virtualization Technology". Other wise you will get the error while start the Android Virtual Device. More Information.
Some screen shot
6. Download git from (https://git-scm.com/downloads) this is optional but you may need for install any plugins from github.
eg- cordova plugin add https://github.com/xmartlabs/cordova-plugin-market )
Configurations:
After download and install all requirement softwares, you need to configure the settings.
1. Go to the My computer properties (Right click from my computer => click properties).
2. Click Advanced System Settings and open Environment Variable.
3. We need to add some system variable, add new system variable through the following window.
Variable name : ANDROID_HOME
Variable value : D:\Program Files\Android Studio\SDK
Variable name : Android_SDK
Variable value : D:\Program Files\Android Studio\SDK
Variable name : JAVA_HOME
Variable value : D:\Program Files\Java\jdk1.8.0_60
The Path system variable is already created by system and some value is already exist's, so just continue with ; (semi colon).
Note : Don't remove any existing values.
Variable name : Path
Variable value : ;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools
if you want to change the default directory of the Android Virtual Device, add the following environment variable(this is the optional variable).
Variable name : ANDROID_SDK_HOME
Variable value : F:\AVD Android Device (where to save the virtual device)
Default location is : C:\Users\[your username]
3.Finally open the command prompt and type cordova and press enter if display any error message like "'cordova' is not recognized as an internal or external command, operable program or batch file." you are not configure correctly please check the all required software is installed and Environment variable settings. If your correctly installed and configure, you will see the following screen.
Create Android Virtual Device (AVD)
1.Go to the Android Studio installed directory and open SDK directory (eg: D:\Program Files\Android Studio\SDK).
2. Open AVD Manager.exe.
3.Create a Virtual Device, with your project compatibility or create the Virtual device through Android studio.
0 comments:
Post a Comment