Ionic build android throws “Uh oh!” error after updating cordova

I just updated cordova via sudo npm install -g cordova

Now i have the problem, that everytime when i try to build the android app with ionic run android --device i get

Error during processing of action! Attempting to revert...
ERROR running one or more of the platforms: TypeError: Uh oh!
Invalid Version: undefined
You may not have the required environment or OS to run this project

or ionic build android

Error during processing of action! Attempting to revert...
Error: Uh oh!
Invalid Version: undefined

IOS is working fine so i think it’s a problem with android?

Android SDK Tools: 24.3.4
Android SDK Platform-tools: 23.0.1
Android SDK Build-tools: 23.0.2
SDK: Android 5.1.1 (API 22)

The combo i have:

Cordova CLI: 5.4.1
Ionic Version: 1.1.0
Ionic CLI Version: 1.7.10
Ionic App Lib Version: 0.6.5
ios-deploy version: 1.7.0 
ios-sim version: 4.1.1 
OS: Mac OS X El Capitan
Node Version: v0.12.7
Xcode version: Xcode 7.1 Build version 7B91b

Stackoverflow link: http://stackoverflow.com/questions/33981901/ionic-build-android-throws-uh-oh-error-after-updating-cordova

@mazz I’m facing this same issue, but with no luck figuring how to resolve it just yet.

@mazz I solved it by reverting to an older version of cordova. npm install -g cordova@5.4.0. You gotta love those fixes :wink:

3 Likes

hi
ok i juste delete “android” folder in platform and add again android : sudo ionic build android
:smiley:

It’s work for me.

$ ionic state reset

# My info
$ ionic info

Your system information:

Cordova CLI: 5.4.1
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.0
Ionic CLI Version: 1.7.11
Ionic App Lib Version: 0.6.5
ios-deploy version: 1.8.3 
ios-sim version: 5.0.4 
OS: Mac OS X El Capitan
Node Version: v4.2.3
Xcode version: Xcode 7.2 Build version 7C68
1 Like

Thanks man it worked for me!!

1 Like

same thing, fixed it by reverting to @5.4.0

Thanks… worked for me!