【问题标题】:How to generate react native android apk for production?如何生成 react native android apk 用于生产?
【发布时间】:2016-09-13 03:50:28
【问题描述】:

我正在尝试为 react native 生成​​ android apk。 浏览https://facebook.github.io/react-native/docs/signed-apk-android.html#content提供的文档

1) 生成密钥库 2)设置gradle变量 3) 将签名配置添加到应用程序的 gradle 配置中# 4)通过android studio生成签名apk用于发布(build --> genrate signed apk)

我的项目中有 react .gradle。 但是运行这个 apk 会出现错误 java.lang.RuntimeException: ReferenceError: Can't find variable: __fbBatchedBridge (:1)

【问题讨论】:

    标签: react-native


    【解决方案1】:

    您似乎仍在运行开发者的 mod 应用程序。你确定你遵循了“生成签名的 APK”的所有 todo 吗???

    -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

    确保在android/app/build/outputs/apk/app-release.apk"中启动正确的apk

    【讨论】:

      猜你喜欢
      • 2018-03-21
      • 1970-01-01
      • 2021-02-08
      • 1970-01-01
      • 1970-01-01
      • 2021-03-19
      • 2020-08-18
      • 2018-02-27
      • 2019-02-22
      相关资源
      最近更新 更多