I want to run my application in phone but I get following message:

Installation failed with message:

> 
> INSTALL\_FAILED\_UPDATE\_INCOMPATIBLE: Package signatures do not match
> the previously installed version; ignoring!.
> 
> 
> It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
> WARNING: Uninstalling will remove the application data!
> Do you want to uninstall the existing application?
> 
> 
> 

In my phone I have installed previous version of app from google play. I know that uninstalling old version of app from my phone can fix the problem but I don't want to do this because then I might lose all app specific data.

What I tried:

* generating signed version of app using the same keystore.jks like previously
* changing versionCode and versionName in build.grandle file and then generating new version of app

And still I have the same problem. What should I do to update my app without losing data?