Вопрос

When running an Android Test from Android Studio I always get:

Failure [INSTALL_FAILED_VERSION_DOWNGRADE]

This happens even if I have uninstalled the app or created a fresh virtual device.

Any idea what this is and how to solve it?

Это было полезно?

Решение

I was also getting this same error on a fresh install when testing in Android Studio. In my case I changed the name of the testPackageName. This was the same as the default package name.

Now the tests are running smoothly. I don't know why it worked but it did. Increasing the versionCode should have worked but it didn't.

Другие советы

INSTALL_FAILED_VERSION_DOWNGRADE means that the app installed on the device/simulator has lower versionCode that the build you are trying to install. You need to uninstall it first, or bump versionCode

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top