Android: keytool error: java.lang.Exception: Keystore file exists, but is empty

If you are getting the following error while creating a new key via Android Studio:

 keytool error: java.lang.Exception: Keystore file exists, but is empty

The solution is to set the correct path for key store. The default path where the key store is this:

/Users/<YourUserName>/.android/debug.keystore

Setting the correct path will fix the issue.