If you have a new Android development setup on your system, and it's your first project, and you want to "display the SHA1 (or MD5) certificate fingerprint". May be you will get the error of:
keytool error: java.lang.Exception: Keystore file does not exist: /.../.android/debug.keystore
To generate the debug.keystore, you have to run any app at least one time. Just create and run any simple "Hello World" to generate it.