# Unable to update cordova-android

**URL:** <https://forum.ionicframework.com/t/unable-to-update-cordova-android/38032>\
**Category:** ionic-v1\
**Created:** [November 27, 2015, 6:27pm UTC](https://forum.ionicframework.com/t/unable-to-update-cordova-android/38032 "2015-11-27T18:27:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmd](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@jmd](https://forum.ionicframework.com/u/jmd)\
**Post date:** [November 27, 2015, 6:27pm UTC](https://forum.ionicframework.com/t/unable-to-update-cordova-android/38032/1 "2015-11-27T18:27:11Z")

</div>

I’ve successfully built an iOS version of my app and I’m now trying to add Android. However, when I do a `ionic platform add android` one of the plugins (cordova-plugin-geolocation) fails with the following error:

```auto
Failed to install 'cordova-plugin-geolocation':CordovaError: Plugin doesn't support this project's cordova-android version. cordova-android: 4.0.2, failed version requirement: >=5.0.0-dev

```

I thought I was running the latest version of Cordova so I double check  
`ionic info`  
which returns this:

```auto
Cordova CLI: 5.1.1
Gulp version: CLI version 3.8.11
Gulp local: Local version 3.8.11
Ionic Version: 1.1.1
Ionic CLI Version: 1.7.10
Ionic App Lib Version: 0.6.5
ios-deploy version: 1.5.0 
ios-sim version: 3.1.1 
OS: Mac OS X El Capitan
Node Version: v0.12.2
Xcode version: Xcode 7.1.1 Build version 7B1005 

```

So, perhaps the project isn’t up to date? I run:  
`cordova -v`  
which returns:  
`$ 5.1.1`

OK something’s odd so I’ll just try to update the project by running:  
`cordova platform update android`  
which outputs this:

```auto
Updating android project...
Android project updated with cordova-android@4.0.2
...

```

So, I’ve tried removing/adding the platform:  
`ionic platform rm android`  
followed by  
`ionic platform add android`  
which oddly includes this snippet:

```auto
$ ionic platform add android
Updated the hooks directory to have execute permissions
Running command: /Volumes/Data/Documents/development/cordova/xxxx/hooks/before_platform_add/init_directories.js /Volumes/Data/Documents/development/cordova/xxxx
npm http GET https://registry.npmjs.org/cordova-android
npm http 304 https://registry.npmjs.org/cordova-android
Adding android project...
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: com.xxxx
	Name: xxxx
	Activity: MainActivity
	Android target: android-22
Copying template files...
Android project created with cordova-android@4.0.2

```

**So 3 questions:**

- Why is it suddenly referring to an old version of cordova (I’ve tried to find references to 4.0.2 in config.xml etc but no luck - any ideas welcome!)?
- What command do I need to run to see what version of cordova-android this particular project is using?
- What do I need to do to update the version of cordova-android used in this project?

Thanks,  
James

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [November 28, 2015, 10:42pm UTC](https://forum.ionicframework.com/t/unable-to-update-cordova-android/38032/2 "2015-11-28T22:42:41Z")

</div>

FYI: Cordova (CLI) and Cordova Android are two different things.
