React Native Android:通过Android Studio生成签名APK不包含JS Bundle [英] React Native Android: Generating Signed APK through Android Studio doesn't include JS Bundle

查看:113
本文介绍了React Native Android:通过Android Studio生成签名APK不包含JS Bundle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过Android Studio生成签名APK不包含JS Bundle.我一直在努力在无法正常工作的设备上安装发行版本.最终,我为Release版本启用了调试功能,并且发现通过android studio生成的已签名apk不包含js捆绑包.

Generating Signed APK through Android Studio doesn't include JS Bundle. I have been struggling install the release build on device it was not working. finally i enabled the debugging for Release build and i find out that Generated signed apk through android studio doesn't include js bundle.

我如何生成包含js捆绑包的签名apk?上传到Play商店.

How can i generate a signed apk including js bundle? to upload to play store.

推荐答案

我在RN文档中找到了它:

I found it on RN documentations :

在Android Studio中创建发布版本您可以使用Android Studio也可以创建您的发行版!就像创建发布一样简单您以前存在的本机Android应用的构建.只是另一个步骤,您必须在每个发行版之前执行建造.您需要执行以下命令来创建一个React Native包,该包将包含在您的本地Android应用中:

Creating a release build in Android Studio You can use Android Studio to create your release builds too! It’s as easy as creating release builds of your previously-existing native Android app. There’s just one additional step, which you’ll have to do before every release build. You need to execute the following to create a React Native bundle, which’ll be included with your native Android app:

react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/com/your-company-name/app-package-name/src/main/assets/index.android.bundle --assets-dest android/com/your-company-name/app-package-name/src/main/res/

现在只需从Android内部创建本机应用程序的发行版像往常一样录音室,您应该一切顺利!

Now just create a release build of your native app from within Android Studio as usual and you should be good to go!

这篇关于React Native Android:通过Android Studio生成签名APK不包含JS Bundle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆