AllInWorld99 provides a reference manual covering many aspects of web programming, including technologies such as HTML, XHTML, CSS, XML, JavaScript, PHP, ASP, SQL,FLASH, jQuery, java, for loop, switch case, if, if else, for...of, for...in, for...each,while loop, blogger tips, blogger meta tag generator, blogger tricks, blogger pagination, client side script, html code editor, javascript editor with instant output, css editor, online html editor, materialize css tutorial, materialize css dropdown list,break, continue statement, label,array, json, get day and month dropdown list using c# code, CSS button,protect cd or pendrive from virus, cordova, android example, html and css to make android app, html code play,telerik show hide column, Transparent image convertor, copy to clipboard using javascript without using any swf file, simple animation using css, SQL etc. AllInWorld99 presents thousands of code examples (accompanied with source code) which can be copied/downloaded independantly. By using the online editor provided,readers can edit the examples and execute the code experimentally.


Configure and install cordova requirements
     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)

JDK installed location

3. Download and install latest node.js from google or node 0.12.7 here.
    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)".


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.


find and install intel hardware accelerated

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.


Open Environment Variables



















3. We need to add some system variable, add new system variable through the following window.
Add New Environment Variable


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.

Cordova in command prompt


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.

Android Virtual Device (AVD)

3.Create a Virtual Device, with your project compatibility or create the Virtual device through Android studio.

Create Virtual Device from Android Studio



                           Next Create a simple Android app using cordova >> 




0 comments:

Post a Comment

Total Pageviews