如何为生产构建 React Native android 应用程序?

如何为生产构建 React Native android 应用程序?

问题描述:

我已经看到了适用于 android 的 React Native 的新版本并尝试了一些示例.它仅适用于 USB 调试模式和adb reverse tcp:8081 tcp:8081".如何为生产"构建 android 应用程序,包括所有依赖项并且没有反应网络服务器连接.谢谢.

I've seen new release of react native for android and tried some examples. It works only with USB debug mode and "adb reverse tcp:8081 tcp:8081". How can I build android app for "production" including all dependencies and without react web-server connections. Thank you.

要构建 Android 应用的发布版本:

To build a release version of your Android app:

$ cd your-app-folder
$ cd android && ./gradlew assembleRelease

您需要为 Play 商店设置签名密钥,完整文档在此:http://facebook.github.io/react-native/docs/signed-apk-android.html

You'll need to set up signing keys for the Play Store, full documentation here: http://facebook.github.io/react-native/docs/signed-apk-android.html