androidreact-nativecreate-react-native-app

Do I really need to generate key store every time that I want to test my apk file by using outside development environment in react native


I want to test my react native application by installing it on other devices. I already got release apk file from output folder in Android directory. I want to get the recently updated version of my react native application to test outside of my development environment. How to get the updated version of my application?


Solution

  • Every Android app needs to be signed. Otherwise it will fail to install.

    Android Studio generates a default keystore and key. It uses it to sign your app if you deploy a debug version of it during development unless you specify an own key.

    If you want to distribute your app to others, you should generate an own key and use only this. Once you released your app to any app store, you must always use this same key to sign your apps*.

    Android devices will only accept APKs as an app update if the old and new version are signed with the same key. Otherwise, if both apps have the same application ID but different signing keys, the update will fail.

    The best practice is to store your key and the passwords somewhere safe. E.g. in a separate private git repository and a password manager.

    Whenever you change development environments (work on a different computer), you need to reuse the same key in order to be able to update your app.

    * You change keys in the Google Play store but for this, you still need to have the original key