2016-02-17 41 views
1

如何从我的react-native项目构建android apk? 这个命令“react-native run-android”在文件夹android \ app \ build \ outputs \ apk \ 上创建app-debug.apk但是当我在手机上安装它时,出现错误“Unable to download JS bundle” 。当我开始在模拟器我第一次使用命令来解决这个问题:如何从我的react-native项目构建android apk?

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

回答

2

这一切都写here

您需要首先生成签名密钥,然后将它们设置为变量,使用它们来配置您的应用程序,然后创建一个签名的apk。

如果您在此流程的确切点上需要任何帮助,我很乐意为您提供帮助。但检查文档,他们写得很好。

+1

我做到了,但是当我在我的智能手机上运行这个apk后,apk强行关闭。 – Maksim

+1

检查[this](http://stackoverflow.com/questions/35406657/react-native-android-application-has-stopped/35413351#35413351) –

+0

非常感谢。 – Maksim

相关问题