Installation failed to finalize session... Signatures are inconsistent - Android

Android

Android Problem Overview


I am trying to run my project but I get this error:

> Installation failed with message Failed to finalize session : > INSTALL_FAILED_INVALID_APK: /data/app/vmdl1841863905.tmp/11_app-debug > signatures are inconsistent. 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?

If I press yes, after some seconds it just shows the same error. I tried to manually delete the application but the application is already deleted from my phone.

Android Solutions


Solution 1 - Android

This error usually happens to me in Android Studio when I try to open a project that was moved from another path or location, also other circumstances might cause this, what works for me is:

  • menu "Build"
  • run "Rebuild Project".

Then run app on device or emulator, and error goes away. I know the error has nothing to do with this but that's what fixes it for me, try and let me know.

Solution 2 - Android

Am also faced same problem. It can be solved.Delete the below mentioned directories and restart AndroidStudio.Run the application.

enter image description here

Solution 3 - Android

Disable the Instant run in Android Studio and then Clean,Rebuild and Run ,It should fix this issue.

Solution 4 - Android

Solution: Disable Instant Run

Android Studio > Preferences > Build, Execution, Deployment > Uncheck Enable Instant Run to hot swap code/resource changes on deploy

My issues was specifically related to a package inconsistency:

Installation failed with message Failed to finalize session: INSTALL_FAILED_INVALID_APK: /data/app/vmdel334040403.tmp/11_package_name_--dev package com.package.name inconsistent with com.package.othername It is possible that this issue is resolved by uninstalling...

Nope, not true. There was nothing to uninstall. Nothing worked. Cleaning, Invalidate Cache/Restart, deleting folders, .gradlew, restarting the device, unplugging things, etc...

Also as a tip to everyone, when you're making your package name for a project, save yourself the troubles I've had and DO NOT CHANGE IT. It's a unique identifier for your app in the play store. It's used in a lot of cloud messaging identification and deeplinking for package names.

Android Studio 3.1 Build #AI-173.4670197, built on March 21, 2018 JRE: 1.8.0_152-release-1024-b01 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.12.6

Solution 5 - Android

In Android Studio from build menu:

1. Clean Project
2. Rebuild Project

This solved the same issue for me...

Solution 6 - Android

Disable Instant run in Android Studio. Then Clean, Rebuild and Run. It should fix this issue.

> To disable Instant run, do: > > In Android Studio: PreferencesBuild, Execution, DeploymentUncheck Enable Instant Run to hot swap code/resource changes on deploy.

Solution 7 - Android

I use flavor because I need publish 2 version(Person, Enterprise).

I got the same problem. My solve is write versionCode android versionName in build.gradle.(before it's in the AndroidManifest.xml).

enter image description here

enter image description here enter image description here

Solution 8 - Android

I was do this and solved it:

I uninstall MyAPP.apk,and I can't install right now. so,I install a MyAPP.apk by hand.

Now,I try to retry with Android Studio,and its worked for me.

if you face this bug,try this method ,maybe work for you too.

Solution 9 - Android

Disable the Instant run in Android Studio. 1-Go to Settings. 2-Select Build,Execution,Deployment-->Instant Run-->uncheck Enable Instant Run to hot swap code/resource changes on deploy.

And then Clean,Rebuild and Run ,It should fix this issue

Solution 10 - Android

I got this error after copying an existing app. This helped:

  1. Go to project folder, navigate to build.gradle Under (module:app).
  2. click the build.gradle, check under defaultConfig, change the applicationId if it still refers to the original project you copied.
  3. Then go to, Tools > Android > Sync Project

That worked for me. If it doesn't proceed to the AndroidManifest xml and change the label to the string resource for the new app name.

Solution 11 - Android

I was able to solve this by doing:

  1. unplug device
  2. adb kill-server
  3. adb start-server
  4. plug device
  5. Run the app from a virtual device

Solution 12 - Android

I got this error after adding a signing config.

Solved it by deleting the build folder::

  1. Project view -> app -> build (delete this folder or all the folders under it)
  2. Clean project
  3. Rebuild project

Solution 13 - Android

in my case after Rebuild Project worked :D

Solution 14 - Android

In my case I had added extra blank line after versionCode line. I kept getting version inconsistent issue. It finally went off after removing extra blank line and syncing again.

Solution 15 - Android

I got the same error as you after updating my Windows 10. What I did to make it work, was to clean and rebuild the project.

Solution 16 - Android

For me I had to restart my phone to get it to work (the app was uninstalled when I restarted my phone).

Solution 17 - Android

In AndroidManifest.xml you should add android:installLocation="preferExternal" above <application ... />.

enter image description here

Solution 18 - Android

I solved it by deleting all old applications from the target device. Give it a try once you are using the single device to deploy all your applications.

I could not find Uncheck Enable Instant Run option in my android studio 3.6.

Solution 19 - Android

  1. Build-> Rebuild Project.
  2. Clean.
  3. Run Specifically, It worked for me. Hopefully, the problem will solve.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionStudentView Question on Stackoverflow
Solution 1 - AndroidAbelSuraceView Answer on Stackoverflow
Solution 2 - AndroidSathish GaddeView Answer on Stackoverflow
Solution 3 - AndroidKunal ParteView Answer on Stackoverflow
Solution 4 - AndroidBlaze GawlikView Answer on Stackoverflow
Solution 5 - AndroidHamedView Answer on Stackoverflow
Solution 6 - AndroidSnowmanView Answer on Stackoverflow
Solution 7 - AndroidcodingnowView Answer on Stackoverflow
Solution 8 - AndroiddidikeeView Answer on Stackoverflow
Solution 9 - AndroidRavindra PawarView Answer on Stackoverflow
Solution 10 - AndroidVictor Nyale KalamaView Answer on Stackoverflow
Solution 11 - AndroidStudentView Answer on Stackoverflow
Solution 12 - Androidn_rView Answer on Stackoverflow
Solution 13 - Androidcalincan mirceaView Answer on Stackoverflow
Solution 14 - AndroidxrndView Answer on Stackoverflow
Solution 15 - AndroidTeck ChuanView Answer on Stackoverflow
Solution 16 - AndroidPhoenixBView Answer on Stackoverflow
Solution 17 - AndroidAnh HuynhView Answer on Stackoverflow
Solution 18 - AndroidKeshav KumarView Answer on Stackoverflow
Solution 19 - AndroidShahbaz AhmedView Answer on Stackoverflow