This command prompts you for passwords for the keystore and key. Write down your password, you will need it later. It then generates the keystore as a file called my-release-key.keystore.
Note: On Windows keytool must be run from C:\Program Files\Java\jdkx.x.x_x\bin
Step 2: Add your keystore in the android/app
Place the my-release-key.keystore file inside the android/app directory in your project folder.
Next, open the file android/gradle.properties and add the following variables (replace ***** with the correct keystore password, alias and key password):
Open android/src/main/res/values/strings.xml and change the app_name value.
Step 4: Change bundle identifier:
Note: Skipping any of the changes below will result in errors once publishing your app to the Play Store.
Renamed your project subfolders (3 file name changes) from: "android/app/src/main/java/com/knowlephant/share/" to: "android/app/src/main/java/com/YOUR_COMPANY_NAME/YOUR_APP_NAME/"
BundleIDs are often written as
com.YOUR_COMPANY_NAME.YOUR_APP_NAME
Then manually switched the old and new package ids:
In android/app/src/main/java/MY/APP/NEW_ID/MainApplication.java:
In android/app/src/main/AndroidManifest.xml:
And in android/app/build.gradle:
In android/app/BUCK:
Finally do a Gradle' cleaning in the end using the following commands in Terminal/Command line:
Step 5: Generate the release APK:
The generated APK can be found in the following folder: /MobileApp/android/app/build/outputs/bundle/release/app-release.aab.
Step 6: Upload to Google Play Console
Assuming you have completed the Play Store app description, images, and all other fields Play Store requires for app submissions, you can now upload your app by:
Creating an Internal Testing track and add yourself as a tester.
Upload your app bundle.
Submit for internal testing.
Once you're happy with the build, you can promote your build for release to the Play Store.