Recently phonegap & Android Studio has a new version of new building system (Gradle Build). many beginner developers don’t know about this building system.for Example, who use android studio old Version like 1.00.

Old project Structure and new Gradle project structure are pretty different.Now time to need Maigret project in new building system in this system are easy. but the question is if you don’t know this new build system than your not able to Maigret your old project to new Gradle build project.

Recently google announce to update google play service  in this update google user her all tools in one place and make developing apps with google tools very easy.

In this article, I will show native apps developing tools like PhoneGap project developing with an android studio in Gradle build.

If you have already created an application with PhoneGap . and now find to migrate old project in new gradle building project then this article is helpful to you.

Here I’m showing few easy step. if you try this step than you will be easily Maigret  your old project to a new building system.
So let’s start


To start first Please do this simple
Update Android Studio for Latest version.
Update android SDK Tools Minimum 19.0.1 Installed
Install Google API (Android 4.2.2 17 ) via SDK tools
Install Google Play Service & Google Repository Vai SDK tools
Android SDK Build Tools 19.0.2
Build gradle 0.9.+ or  gradle-1.10-all
Download PhoneGap ( minimum 2.9.0 )
And Also Need to Install Java Development Kit JDK 1.7.0_45
Check Environment:
If you have done this now Check your PC Environment Simple Flowing this Article Environment Setup Guide.
Now Let’s Start.
Create a project. New Project > If you don’t know how to see here this article How to create gradle build project in using android studio

Adding PhoneGap :

1.  Copy cordova-2.9.0.jar File And Past Into your libs/ folder . See Blow Image Details


2. Now Copy [assets] [cordova] both folder from x:yourlocationphonegap-2.9.0phonegap-2.9.0libandroidexample means your downloading phonegap folder and past in to newly create project folder scr/ main Looking image 2

android studio
Phonegap-2.9.0  example project
Build PhoneGap Project with AndroidStudio In using Gradle Build 1
After Past, both folders your project show this

In this image after past [assets] & [cordova] folder you android studio project will show now assets>www and cordova add in scr/main.

Save the changes and click Sync Project with Gradle Files Build PhoneGap Project with AndroidStudio In using Gradle Build 2 in the toolbar.

3.  Now I will need to add Config.xml file and this project. simple copy XML folder in phonegap-2.9.0libandroidexampleresxml  and the past into nNew scr/main/reshere after pasting this your new res project directory look like

Build PhoneGap Project with AndroidStudio In using Gradle Build 3

Save the changes and click Sync Project with Gradle Files Build PhoneGap Project with AndroidStudio In using Gradle Build 2 in the toolbar.
4.  Open up AndroidMainifest.xml file set flowing the permission line before the

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""

<uses-permission android:name=“android.permission.CAMERA” />
<uses-permission android:name=“android.permission.VIBRATE” />
<uses-permission android:name=“android.permission.ACCESS_COARSE_LOCATION” />
<uses-permission android:name=“android.permission.ACCESS_FINE_LOCATION” />
<uses-permission android:name=“android.permission.ACCESS_LOCATION_EXTRA_COMMANDS” />
<uses-permission android:name=“android.permission.INTERNET” />
<uses-permission android:name=“android.permission.RECEIVE_SMS” />
<uses-permission android:name=“android.permission.RECORD_AUDIO” />
<uses-permission android:name=“android.permission.RECORD_VIDEO”/>
<uses-permission android:name=“android.permission.MODIFY_AUDIO_SETTINGS” />
<uses-permission android:name=“android.permission.READ_CONTACTS” />
<uses-permission android:name=“android.permission.WRITE_CONTACTS” />
<uses-permission android:name=“android.permission.WRITE_EXTERNAL_STORAGE” />
<uses-permission android:name=“android.permission.ACCESS_NETWORK_STATE” />
<uses-permission android:name=“android.permission.GET_ACCOUNTS” />
<uses-permission android:name=“android.permission.BROADCAST_STICKY” />
android:label=“@string/app_name” >

<activity android:name=“.MainActivity”

<action android:name=“android.intent.action.MAIN” />
<category android:name=“android.intent.category.LAUNCHER” />

<!– Activity google play service. –>
<meta-data android:name=“”
android:value=“@integer/google_play_services_version” />



5. Now open up the file in java remove old code and import by replacing new code. Past flowing code in your file

package com.bijoy.appskhoj.apps;

import android.os.Bundle;
import android.widget.LinearLayout;
import org.apache.cordova.*;
import org.apache.cordova.DroidGap;

public class MainActivity extends DroidGap {
/** The view to show the ad. */

public void onCreate(Bundle savedInstanceState) {


Save the changes and click Sync Project with Gradle Files Build PhoneGap Project with AndroidStudio In using Gradle Build 2 in the toolbar.

Once you’ve completed all of the above you can hit the run button and have the application running whether on the Android Emulator or a device if you have one connected. Now you can start adding all sorts of crazy things to your boring HTML file and see it in action as a mobile app.

Google Play Service Setup :
Google Play Service Setup Guide See Here for Steep by Steep Setup Guide line Install The Google Play Services SDK In Android Studio

Affiliate Disclaimer : As an Amazon Associate I earn from qualifying purchases.