Rick Strahl's Weblog  

Wind, waves, code and everything in between...
.NET • C# • Markdown • WPF • All Things Web
Contact   •   Articles   •   Products   •   Support   •   Advertise
Sponsored by:
West Wind WebSurge - Rest Client and Http Load Testing for Windows

INSTALL_FAILED_VERSION_DOWNGRADE: Watch your Android App Version


:P
On this page:

I’ve been working on a Cordova app on a cheap Galaxy Tab for testing. After a lot of tweaking and finessing config settings and SDK pieces to install I finally managed to get my app to install, run and debug on the Android device using the Visual Studio Tools for Apache Cordova. It was a pain but I was glad I managed to at least get it to run…

Until this morning that is. After making some offline changes to the app and installing a software update on the device I ended up getting:

INSTALL_FAILED_VERSION_DOWNGRADE

when trying to run the Cordova project.

To make sure I dropped to the terminal to use the Cordova CLI to make sure it’s not the tooling screwing up but I found the same behavior. The project would compile but when the time comes to deploy to the device I kept getting this error:

FailureToLaunch

My first thought was of course that the problem was the software update. After some searches on StackOverFlow there were lots of suggestions for re-installing the USB drivers for the device and the SDKs – both of which I actually did, but that didn’t help.

Watch your Project’s Version Number!

It turns out the problem was that I changed the version number of my project – down.  I’d been running with the default version number of 1.0.0 and I decided today to flip the version number down to 0.1.0 since it’s a pre-release version.

Well, it appears that when you install a new package with a lower version number it doesn’t want to install on the device, at least for running development installs (not sure what happens from an app store but I think that would actually uninstall first anyway).

The solution was simple enough: I uninstalled the old app from the device and re-ran:

cordova run android

and this time the app deployed and fired up on the Galaxy Tab. The Visual Studio Attach operation also worked at that point.

Problem solved, with a relatively easy solution. But man did it take some time to track this down. Countless other issues related to this error message popped while searching for it, and sifting through all of them took a long time before arriving at this simple solution. A clearer error message would go a long way towards making this a lot easier.

Posted in Cordova  

The Voices of Reason


 

JD
October 31, 2015

# re: INSTALL_FAILED_VERSION_DOWNGRADE: Watch your Android App Version

Thanks! You saved me a lot of hair pulling! I added the crosswalk plugin to a cordova app, and it started giving me this same problem. Uninstalling the copy of the app on the phone did the trick. Thanks!

West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2024