title: Creating a Phonegap based Android ap in Android Studio
body: <p>I've dabbled with Phonegap using Eclipse and the ADT plugins in the past and I'm now trying to get my head around doing this in the new Android Studio IDE.</p>
  
  <p>Since Phonegap v3 seems to rely on some kind of NodeJS commandline installation thingy, of which I know absolutely nothing about, I've downloaded Phonegap v2.9 instead. Also since Android Studio is so new and the documentation seems to only cover importing existing Eclipse projects or projects built using Phonegap's commandline, I'm instead trying to follow old Eclipse documentation.</p>
  
  <p>To get to the point, I've created a project in Android Studio and verified that it runs. I've then created /assets/www and copied cordova.js and a basic index.html file in. I've copied cordova-2.9.0.jar in to /libs and right clicked to 'add as library'. Finally, I've amended MainActivity.java and AndroidManifest.xml accordingly.</p>
  
  <p>The problem though is that when the build gets to 'import org.apache.cordova.*;' in my MainActivity.java file, it's erroring out with 'Gradle: package org.apache.cordova does not exist'.</p>
  
  <p>Could somebody please point me in the direction of some documentation on creating a Phonegap ap using Android Studio (rather than importing in from Eclipse or from something created via Phonegap commandline), or even just describe how I'm supposed to edit the build.gradle file so that Gradle can find Cordova?</p>
  
  <p>Much appreciated.</p>