For uploading apps to PlayStore or configuring firebase, you need to sign your builds with uniquely generated keys and keystores. Follow instructions here:
- Creating a keystore from an Android Project is easier. So create new android dummy project. Name it Dummy.
- Open this project in Android Studio.
- In the menu bar, click Build > Generate Signed Bundle/APK.
- In the Generate Signed Bundle or APK dialog, select Android App Bundle or APK and click Next.
- Below the field for Key store path, click Create new.
- On the New Key Store window, provide the following information for your keystore and key, as shown in figure 2.
- Keystore
- Key store path: Select the location where your keystore should be created. Also, a file name should be added to the end of the location path with the .jks extension.
- Password: Create and confirm a secure password for your keystore. Remember this, you’ll need to use it.
- Key
- Alias: Enter an identifying name for your key. Remember this, you’ll need to use it.
- Password: Create and confirm a secure password for your key. This should be the same as your keystore password. Remember this, you’ll need to use it.
- Validity (years): Set the length of time in years that your key will be valid. Your key should be valid for at least 25 years, so you can sign app updates with the same key through the lifespan of your app.
- Certificate: Enter some information about yourself for your certificate. This information is not displayed in your app, but is included in your certificate as part of the APK.
Follow Android Docs for any further help: Generate an upload key and keystore
Once you have generated a keystore.jks, you need to replace the existing keystore here:
Project_HOME > android > houzi_public_keystore.jks
If you have different name, you need to update its reference in this file:
Project_HOME > android > key.properties
The key.properties
file refers to path relevant to gradle location. So always consider adding a path with relation to the gradle file.