Installation failed to finalize session... Signatures are inconsistent - Android
AndroidAndroid 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.
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: Preferences → Build, Execution, Deployment → Uncheck 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).
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:
- Go to project folder, navigate to
build.gradle
Under (module:app). - click the
build.gradle
, check underdefaultConfig
, change the applicationId if it still refers to the original project you copied. - 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:
- unplug device
- adb kill-server
- adb start-server
- plug device
- 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::
- Project view -> app -> build (delete this folder or all the folders under it)
- Clean project
- 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 ... />
.
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
- Build-> Rebuild Project.
- Clean.
- Run Specifically, It worked for me. Hopefully, the problem will solve.