How to reset the upload key for a react native expo app that will be used to sign APKs to upload to Google Play?

I reach out to google and they sent me this:

Here’s how to generate and register a new upload key:

  1. Follow the instructions in the Android Studio Help Center to generate a new key. It must be different from any previous keys. Alternatively, you can use the following command line to generate a new key:

keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks

This key must be a 2048 bit RSA key and have 25-year validity.

  1. Export the certificate for that key to PEM format:

keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks

  1. Send us the upload_certificate.pem file.

My question is how to do this with a react native expo app?

why do you need to do this?

you can run expo build:android --clear-credentials to clear your existing credentials and generate new ones. then expo fetch:android:keystore to download the new one

1 Like

Okay and how to export the certificate key in a upload_certificate.pem file format for google?

expo fetch:android:upload-cert
or you can do that with keytool command

2 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.