Upgrading Android
This guide shows how to modify Android projects to upgrade from older versions of Cordova.
Most of these instructions apply to projects created with an older set
of command-line tools that precede the cordova CLI utility. See The Command-line Interface for information how to update the
version of the CLI.
Upgrade to the CLI (3.0.0) from 2.9.0
-
Create a new Apache Cordova 3.0.0 project using the cordova CLI, as described in The Command-line Interface.
-
Add your platforms the the cordova project, for example:
cordova platform add android. -
Copy the contents of your project's
wwwdirectory to thewwwdirectory at the root of the cordova project you just created. -
Copy any native assets from your old project into the appropriate directories under
platforms/android: this directory is where your native cordova-android project exists. -
Use the cordova CLI tool to install any plugins you need. Note that the CLI handles all core APIs as plugins, so they may need to be added. Only 3.0.0 plugins are compatible with the CLI.
Upgrade to 3.0.0 from 2.9.0
-
Create a new Apache Cordova Android project.
-
Copy the contents of your
wwwdirectory to the new project. -
Copy any native Android assets from your
resdirectory to the new project. -
Copy over any plugins you installed from the
srcsubdirectories into the new project. -
Make sure to upgrade any deprecated
<plugin>references from your oldconfig.xmlfile to the new<feature>specification. -
Update any references to the
org.apache.cordova.apipackage to beorg.apache.cordova.
- NOTE: all core APIs have been removed and must be installed as plugins. Please see the Using Plugman to Manage Plugins Guide for details.
Upgrade to 2.9.0 from 2.8.0
- Run
bin/update <project_path>.
Upgrade to 2.8.0 from 2.7.0
-
Remove
cordova-2.7.0.jarfrom the project'slibsdirectory. -
Add
cordova-2.8.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova.jsinto your project. -
Update your HTML to use the new
cordova.jsfile. -
Copy the
res/xml/config.xmlfile to matchframework/res/xml/config.xml. -
Update
framework/res/xml/config.xmlto have similar settings as it did previously. -
Copy files from
bin/templates/cordovato the project'scordovadirectory.
Upgrade to 2.7.0 from 2.6.0
-
Remove
cordova-2.6.0.jarfrom the project'slibsdirectory. -
Add
cordova-2.7.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-2.7.0.jsinto your project. -
Update your HTML to use the new
cordova-2.7.0.jsfile. -
Copy the
res/xml/config.xmlto matchframework/res/xml/config.xml. -
Update
framework/res/xml/config.xmlto have similar settings as it did previously. -
Copy files from
bin/templates/cordovato the project'scordovadirectory.
Upgrade to 2.6.0 from 2.5.0
-
Remove
cordova-2.5.0.jarfrom the project'slibsdirectory. -
Add
cordova-2.6.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-2.6.0.jsinto your project. -
Update your HTML to use the new
cordova-2.6.0.jsfile. -
Copy the
res/xml/config.xmlto matchframework/res/xml/config.xml. -
Update
framework/res/xml/config.xmlto have similar settings as it did previously. -
Copy files from
bin/templates/cordovato the project'scordovadirectory.
Run bin/update <project> with the project path listed in the Cordova Source directory.
Upgrade to 2.5.0 from 2.4.0
-
Remove
cordova-2.4.0.jarfrom the project'slibsdirectory. -
Add
cordova-2.5.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-2.5.0.jsinto your project. -
Update your HTML to use the new
cordova-2.5.0.jsfile. -
Copy the
res/xml/config.xmlto matchframework/res/xml/config.xml. -
Update
framework/res/xml/config.xmlto have similar settings as it did previously. -
Copy files from
bin/templates/cordovato the project'scordovadirectory.
Upgrade to 2.4.0 from 2.3.0
-
Remove
cordova-2.3.0.jarfrom the project'slibsdirectory. -
Add
cordova-2.4.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-2.4.0.jsinto your project. -
Update your HTML to use the new
cordova-2.4.0.jsfile. -
Copy the
res/xml/config.xmlto matchframework/res/xml/config.xml. -
Copy files from
bin/templates/cordovato the project'scordovadirectory.
Upgrade to 2.3.0 from 2.2.0
-
Remove
cordova-2.2.0.jarfrom the project'slibsdirectory. -
Add
cordova-2.3.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-2.3.0.jsinto your project. -
Update your HTML to use the new
cordova-2.3.0.jsfile. -
Copy the
res/xml/config.xmlto matchframework/res/xml/config.xml. -
Copy files from
bin/templates/cordovato the project'scordovadirectory.
Upgrade to 2.2.0 from 2.1.0
-
Remove
cordova-2.1.0.jarfrom the project'slibsdirectory. -
Add
cordova-2.2.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-2.2.0.jsinto your project. -
Update your HTML to use the new
cordova-2.2.0.jsfile. -
Copy the
res/xml/config.xmlto matchframework/res/xml/config.xml. -
Copy files from
bin/templates/cordovato the project'scordovadirectory.
Upgrade to 2.1.0 from 2.0.0
-
Remove
cordova-2.0.0.jarfrom the project'slibsdirectory. -
Add
cordova-2.1.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-2.1.0.jsinto your project. -
Update your HTML to use the new
cordova-2.1.0.jsfile. -
Copy the
res/xml/config.xmlto matchframework/res/xml/config.xml. -
Copy files from
bin/templates/cordovato the project'scordovadirectory.
Upgrade to 2.0.0 from 1.9.0
-
Remove
cordova-1.9.0.jarfrom the project'slibsdirectory. -
Add
cordova-2.0.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-2.0.0.jsinto your project. -
Update your HTML to use the new
cordova-2.0.0.jsfile. -
Copy the
res/xml/config.xmlto matchframework/res/xml/config.xml.
Notes about 2.0.0 release
config.xml will be replacing cordova.xml and plugins.xml. This
new file is a combination of the previous two. However, the old files
are deprecated, and while currently still work, will cease working in
a future release.
Upgrade to 1.9.0 from 1.8.1
-
Remove
cordova-1.8.0.jarfrom the project'slibsdirectory. -
Add
cordova-1.9.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-1.9.0.jsinto your project. -
Update your HTML to use the new
cordova-1.9.0.jsfile. -
Update
res/xml/plugins.xmlto matchframework/res/xml/plugins.xml.
Notes about 1.9.0 release
Due to the introduction of the CordovaWebView, third-Party plugins
may not work. These plugins need to get a context from the
CordovaInterface using getContext() or getActivity(). If you
are not an experienced Android developer, please contact the plugin
maintainer and add this task to their bug tracker.
Upgrade to 1.8.0 from 1.8.0
-
Remove
cordova-1.8.0.jarfrom the project'slibsdirectory. -
Add
cordova-1.8.1.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-1.8.1.jsinto your project. -
Update your HTML to use the new
cordova-1.8.1.jsfile. -
Update
res/xml/plugins.xmlto matchframework/res/xml/plugins.xml.
Upgrade to 1.8.0 from 1.7.0
-
Remove
cordova-1.7.0.jarfrom the project'slibsdirectory. -
Add
cordova-1.8.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-1.8.0.jsinto your project. -
Update your HTML to use the new
cordova-1.8.0.jsfile. -
Update
res/xml/plugins.xmlto matchframework/res/xml/plugins.xml.
Upgrade to 1.8.0 from 1.7.0
-
Remove
cordova-1.7.0.jarfrom the project'slibsdirectory. -
Add
cordova-1.8.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-1.8.0.jsinto your project. -
Update your HTML to use the new
cordova-1.8.0.jsfile. -
Update
res/xml/plugins.xmlto matchframework/res/xml/plugins.xml.
Upgrade to 1.7.0 from 1.6.1
-
Remove
cordova-1.6.1.jarfrom the project'slibsdirectory. -
Add
cordova-1.7.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-1.7.0.jsinto your project. -
Update
res/xml/plugins.xmlto matchframework/res/xml/plugins.xml.
Upgrade to 1.6.1 from 1.6.0
-
Remove
cordova-1.6.0.jarfrom the project'slibsdirectory. -
Add
cordova-1.6.1.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-1.6.1.jsinto your project. -
Update
res/xml/plugins.xmlto matchframework/res/xml/plugins.xml.
Upgrade to 1.6.0 from 1.5.0
-
Remove
cordova-1.5.0.jarfrom the project'slibsdirectory. -
Add
cordova-1.6.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-1.6.0.jsinto your project. -
Update your HTML to use the new
cordova-1.6.0.jsfile. -
Update
res/xml/plugins.xmlto matchframework/res/xml/plugins.xml. -
Replace
res/xml/phonegap.xmlwithres/xml/cordova.xmlto matchframework/res/xml/cordova.xml.
Upgrade to 1.5.0 from 1.4.0
-
Remove
phonegap-1.4.0.jarfrom the project'slibsdirectory. -
Add
cordova-1.5.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
cordova-1.5.0.jsinto your project. -
Update your HTML to use the new
cordova-1.5.0.jsfile. -
Update
res/xml/plugins.xmlto matchframework/res/xml/plugins.xml. -
Replace
res/xml/phonegap.xmlwithres/xml/cordova.xmlto matchframework/res/xml/cordova.xml.
Upgrade to 1.4.0 from 1.3.0
-
Remove
phonegap-1.3.0.jarfrom the project'slibsdirectory. -
Add
phonegap-1.4.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
phonegap-1.4.0.jsinto your project. -
Update your HTML to use the new
phonegap-1.4.0.jsfile. -
Update
res/xml/plugins.xmlto matchframework/res/xml/plugins.xml. -
Update
res/xml/phonegap.xmlto matchframework/res/xml/phonegap.xml.
Upgrade to 1.3.0 from 1.2.0
-
Remove
phonegap-1.2.0.jarfrom the project'slibsdirectory. -
Add
phonegap-1.3.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
phonegap-1.3.0.jsinto your project. -
Update your HTML to use the new
phonegap-1.2.0.jsfile. -
Update
res/xml/plugins.xmlto matchframework/res/xml/plugins.xml. -
Update
res/xml/phonegap.xmlto matchframework/res/xml/phonegap.xml.
Upgrade to 1.2.0 from 1.1.0
-
Remove
phonegap-1.1.0.jarfrom the project'slibsdirectory. -
Add
phonegap-1.2.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
phonegap-1.2.0.jsinto your project. -
Update your HTML to use the new
phonegap-1.2.0.jsfile. -
Update
res/xml/plugins.xmlto matchframework/res/xml/plugins.xml. -
Update
res/xml/phonegap.xmlto matchframework/res/xml/phonegap.xml.
Upgrade to 1.1.0 from 1.0.0
-
Remove
phonegap-1.0.0.jarfrom the project'slibsdirectory. -
Add
phonegap-1.1.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
phonegap-1.1.0.jsinto your project. -
Update your HTML to use the new
phonegap-1.1.0.jsfile. -
Update
res/xml/plugins.xmlto matchframework/res/xml/plugins.xml.
Upgrade to 1.0.0 from 0.9.6
-
Remove
phonegap-0.9.6.jarfrom the project'slibsdirectory. -
Add
phonegap-1.0.0.jarto the project'slibsdirectory. -
If you are using Eclipse, please refresh your eclipse project and do a clean.
-
Copy the new
phonegap-1.0.0.jsinto your project. -
Update your HTML to use the new
phonegap-1.0.0.jsfile. -
Add the
res/xml/plugins.xmlto matchframework/res/xml/plugins.xml.