Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

keytool error: java.lang.Exception: Alias <upload> does not exist

I registered for the Google Play app signing capabilities and am having an issue trying to generate the upload key.

I followed the section under: Generate a key and keystore in this article, https://developer.android.com/studio/publish/app-signing. I was able to generate the .jks file.

After this step, things get really confusing as I was unable to find doc. that explains how to generate and use the upload key. I ended up finding this article that provides a keytool command to generate the upload key, How do I make a signed apk with upload key?.

The issue occurs when I try to run that command I keep getting this error message: java.lang.Exception: Alias does not exist. The weird thing is that the .pem file seems to get generated even though I am getting this error.

How can I fix this issue to avoid getting this error? Is this a valid .pem file since I keep getting this error?

like image 258
user1790300 Avatar asked Jun 27 '18 15:06

user1790300


1 Answers

Replace "upload" with your correct alias such as key0. e.g

keytool -export -rfc -alias key0 -file upload_certificate.pem -keystore keystore.jks
like image 196
Mitch M Avatar answered Oct 21 '22 00:10

Mitch M