1

I have downloaded a sample project from official android developers site. When I try to run my app It Pop ups the dialog Pop-upDialog

After pressing the OK Button It shows unknown failure Even I am Running it for the first time... Snapshot of unknown failure

Can Anyone help me how to get rid of this error..

1 Answer 1

3

This error means, that you have an APK installed with a version code newer than the one you want to install.

For example, your current installed app has the version 100, but now you are trying to install version 99. This is in your manifest or in your gradle build script (versionCode). Just increase the versionCode to 101, following my example.

When you click ok the newer version will be uninstalled and the older one will be installed.

Sign up to request clarification or add additional context in comments.

4 Comments

I have tried to run this for the first time even I got this error. I couldn't find where the version of app was written neither in gradle files nor in the manifest.. Is there any other way to change version of app?? my android studio is 1.3.2
Just search for versionCodein path in AndroidStudio. At least in your modules build.gradle there should be a versionCode set.
I have manually added versionCode 1 versionName "1.0" inside defaultConfig of build.gradle. But it also didn't work...I tried changing the version too, And tried to run same in another device also... But same error raises....
Do you know the version code of the installed app? Just try setting the versionCode to 100 or 1000. It needs to be higher than the current one. Or is it your own app? Then have a look in the developer console for the latest version code.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.