I have worked with Phonegap using Eclipse and ADT plugins in the past, and now I'm trying to do this in the new Android Studio IDE.
Since Phonegap v3 seems to rely on some kind of NodeJS host installation, which I don't know anything about, I downloaded Phonegap v2.9 instead. Also, since Android Studio is so new, and it looks like the documentation only covers importing existing Eclipse projects or projects built using Phonegap, I am trying instead to follow the old Eclipse documentation.
To understand, I created a project in Android Studio and checked that it works. Then I created / assets / www and copied cordova.js and the base index.html file. I copied cordova-2.9.0.jar to / libs and right-clicked to add as a library. Finally, I made the appropriate changes to MainActivity.java and AndroidManifest.xml, respectively.
The problem is that when the assembly gets "import org.apache.cordova. *;" in my MainActivity.java file, this is an error with 'Gradle: org.apache.cordova package does not exist'.
Can someone please point me towards some documentation on creating a Phonegap ap application using Android Studio (instead of importing from Eclipse or from something created using the Phonegap command line), or even just describe how I must edit build.gradle so Gradle can find Cordoba?
Great importance.
source share