Generating the Android APK

Building the Android Application Package (APK) is a bit more cryptic than releasing for iOS. There are a few steps that we need to follow before we generate the static bundle, like we did in iOS:

  1. First, we need to generate a key that we can use to sign our application using keytool. Navigate to the android/app folder in a terminal and run this command:
    $ keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
    [Storing my-release-key.keystore]
    

    Note

    Note that this is a private file and should never be shared with anyone. Keep it somewhere safe!

  2. Next we have a few configuration files to update. Up a level in the android/ directory open gradle.properties and add these ...

Get Getting Started with React Native now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.