Generating a certificate or keystore to sign your app using android studio is very easy rather than messing with keytool.
1.Open android studio.
2. Go to Build -> Generate signed apk
1.Open android studio.
2. Go to Build -> Generate signed apk
3.Click the Create new Button appearing on the window.
4.Fill the details appearing on the window
5.Click the Ok button.and then click next button on previous window.
6. select build type as release in the next window.
7.Click on the finish button.
Now check the path where you created your keystore.