如何从我的react-native项目构建android apk? [英] How to build android apk from my react-native project?

查看:90
本文介绍了如何从我的react-native项目构建android apk?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从我的react-native项目构建android apk? 此命令"react-native run-android"在文件夹android \ app \ build \ outputs \ apk \上创建app-debug.apk 但是,当我将其安装在手机上时,出现错误无法下载JS软件包".第一次启动模拟器时,我使用命令来解决此问题:

How to build android apk from my react-native project? This command "react-native run-android" create app-debug.apk on folder android\app\build\outputs\apk\ But when I installed it on my phone, I got an error "Unable to download JS bundle". When I started on emulator first time I use command to fix this problem:

react-native start curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"

推荐答案

全部写成此处.

您需要先生成签名密钥,然后将其设置为变量,使用它们来配置您的应用,然后创建签名的apk.

You need to generate signing keys first, then set them as variables, use them to config you app then create a signed apk.

如果您需要有关此过程的确切帮助,我们将很高兴为您提供帮助.但是请检查一下文档,它们写得很好.

If you need any help on a precise point of this process, I'll be pleased to help you. But check the docs, they are well written.

这篇关于如何从我的react-native项目构建android apk?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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