Android : How to update Cordova in an existing Phonegap app?

on Saturday, November 1, 2014


Google have informed me that some of our Phonegap apps are using a version of Cordova that is now considered insecure, and needs to be updated but it's been so long since I built these apps now that the documentation isn't making much sense to me!


I use Android Studio on GNU/Linux and as far as I can tell, I used NodeJS (the npm commandline) to create a basic Phonegap app, and then imported this into Android Studio. A lot of the documentation references phonegap or cordova commandlines which simply don't exist for me - I only have npm installed.


I ran, from a commandline, "npm update -g cordova" which appears to have brought Cordova v4 in successfully but how do I update the individual apps to use this? In platforms/android/libs within each project I have a cordova-3.0.0.jar file and in platforms/android I have a cordova folder... Do I just replace this folder and the .jar file and use the refactor functions of Android Studio? Where would I copy these from? Presumably the update npm performed has dumped the newer files somewhere...


Cheers.


0 comments:

Post a Comment