How to build apk from react native? I found an option with expo . But apk something does not appear:

  • npm install -g exp
  • Made app.json
  • exp start exp build: android
  • There is a link. Where to get apk?

What am I doing wrong? How do you build react native?

  • And how is the native assembly method bad? Gradle: facebook.imtqy.com/react-native/docs/signed-apk-android.html - Eugene Krivenja
  • I don’t understand where to get the file ~ / .gradle / gradle.properties - VINET
  • According to the Gradle documentation: The Gradle user directory (defined by the “GRADLE_USER_HOME” environment variable, which is not set to USER_HOME / .gradle) " docs.gradle.org/current/userguide/build_environment.html - Eugene Krivenja
  • So this is the java build thing, how should it be used with react native? - VINET
  • This thing to build anything, even cooking recipes :) - Eugene Krivenja

1 answer 1

you generate the key, you get my-release-key.keystore, it is in the android / app folder, you manage build.gradle with your parameters:

MYAPP_RELEASE_STORE_FILE=my-release-key.keystore MYAPP_RELEASE_KEY_ALIAS=my-key-alias MYAPP_RELEASE_STORE_PASSWORD=***** MYAPP_RELEASE_KEY_PASSWORD=***** 

then android $. / gradlew assembleRelease and you will be happy along the route: android / app / build / outputs / apk / app-release.apk