How to deal with INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES

If you get an

Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES

do the following:

  1. go to Settings -> General -> Apps
  2. select your app
  3. tap uninstall