Are you an Android developer or tester? Do you often play with APK files coming from "insecure sources" such as signed APKs built with Android Studio? In case you do, you might likely experience the following problem when trying to install those apps:
App not installed.
That's not the best documented error you can hope for, isnt'it? What makes things ever worse is the fact that the APK is most likely working on other devices, including the Android emulator you (or the developer) just tested it with.
It also goes without saying that neither rebooting the phone and/ or removing the existing .APK and/or uninstalling the app's previous version (if any) seems to fix the issue.
Here's a couple solutions I've come with, mostly thanks to the following StackOverflow thread.
Unsupported v2 Signature (aka Full-APK Signature)
This workaround should be the first thing to try if you're using older phones and/or Android builds <= 6. As you can read here, Android 7.0 "Nougat" introduced the APK Signature Scheme v2, a new app-signing scheme that offers faster app install times and more protection against unauthorized alterations to APK files. By default, Android Studio 2.2 and the Android Plugin for Gradle 2.2 sign your app using both APK Signature Scheme v2 and the traditional signing scheme, which uses JAR signing - meaning that they give the option to sign the APK with either a JAR signature (aka v1) or a full APK sign (aka v2): to be more specific, during the process of building the app the developer is asked to choose between using one or these signature version, none or both of them. As you might easily guess,older phones with older android versions don't support the new v2 signature versions, hence they will raise the "app not installed" error if the APK only contains that one.
The fix for such scenario is to apply both of these signatures, by selecting the two checkboxes - just like shown in the following screenshot:
Uninstall for all users
If the above solution doesn't work for you, you can try something else.
Go back to your phone Settings, then go to the Applications panel and scroll though all apps looking for a pale / greyed out icon of the app you though you're trying to install: if you find it, it means that you didn't uninstall the previous version properly.
Try to click on that icon and see if it says something like this:
Not installed for this user.
The error message can vary between phones - the above one comes from a Nexus 7 - but the meaning is more or less the same, and so is the fix: you need to uninstall that app for all users. You should be able to do that by clicking on the "three dots" button on the top-right corner of that error message and then activating the "Uninstall for all users" command. Right after that, try to install the APK: there's a good chance that your former problem is gone.