1. 32
    Build an Android React Native App for the Google Play Store or for Ad Hoc Distribution
    2m 20s

Build an Android React Native App for the Google Play Store or for Ad Hoc Distribution

Chris Achard
InstructorChris Achard
Share this video with your friends

Social Share Links

Send Tweet
Published 6 years ago
Updated 4 years ago

There are different steps to build an app for the iOS and Android app stores, so here we’ll look at how to build our completed app for Android. We’ll look at how to build a release for either ad-hoc installation, or for uploading to the Google Play Store.

Instructor: [00:00] Check to see if the keytool command is in your path by running keytool. On Windows you'll probably have to run it from program files Java than your jdkversion/bin.

[00:12] Then, generate a new signing key with keytool -genkey -v -keystore my-release-key.keystore -alias mykeyalias -keyalg RSA -keysize 2048 -validity 10000. Enter key password as well as the information about who is requesting the key. This will generate a 2048 bit RSA key that you want to make sure to keep private.

[00:51] It's also important to back up this keystore file and keep it secure, because if you ever have to change it, you'll have to rerelease your app and lose all the old downloads and ratings on the Play Store.

[01:02] Then, copy that file into the android/app directory. Add at the file android/gradle.properties. We'll paste in the following keys substituting in the correct values for the keystore that you just created.

[01:22] Then, add at android/app/build.gradle. First, check that the version code and the version name are set to the versions that you want to release. Now, add a signing config section under the default config.

[01:36] The build types release section add a signing configs line. Then, in our terminal cd into the android folder and build the app with ./gradlew assembleRelease which will build the production version of the app with the new signing key.

[01:57] Once that's complete, you can find the built APK file in android/app/build/output/apk/app-release.apk. That's the final file that you can distribute ad hoc to other android users to install directly on their devices, or upload to the Google Play Store to release to the public.

egghead
egghead
~ 30 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today