stack Learner
stack Learner

Reputation: 1348

How to generate react native android apk for production?

I am to trying to generate android apk for react native . Going through document given at https://facebook.github.io/react-native/docs/signed-apk-android.html#content

1)Generated the keystore 2) Setting up gradle variables 3)Adding signing config to your app's gradle config # 4) Generated signed apk for releasse through android studio (build --> genrate signed apk)

I am having react .gradle in my project. But running this apk gives error java.lang.RuntimeException: ReferenceError: Can't find variable: __fbBatchedBridge (:1)

Upvotes: 1

Views: 742

Answers (1)

Mayoul
Mayoul

Reputation: 626

It seem's that you are still runing the dev's mod app. Are you sure that you followed all the todo for "generating a signed APK" ???

-generate keytool

-Place the my-release-key.keystore file under the android/app

-Edit the file ~/.gradle/gradle.properties with correct values.

-Edit the file android/app/build.gradle and add release{}' part.

-And cd android && ./gradlew assembleRelease

Make sure to launch the correct apk in android/app/build/outputs/apk/app-release.apk"

Upvotes: 1

Related Questions