React Native:包解析错误 [英] React Native : package parse error

查看:65
本文介绍了React Native:包解析错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用以下命令生成发布版本时:

when i try to generate a release version using the following command:

cd android &&./gradlew assembleRelease

cd android && ./gradlew assembleRelease

在目录下生成一个apk文件:

an apk file is generated in the directory:

/app/build/outputs/apk/app-release-unsigned.apk

/app/build/outputs/apk/app-release-unsigned.apk

不幸的是,当我尝试在装有 Android 5 的手机上安装 apk 时,出现以下错误:

Unfortunately when i try to install the apk on my phone with Android 5. i got the following error:

解析包时出现问题.

请注意,我在 Windows 下使用的是 React Native.

Note that i am using react native under windows.

推荐答案

我正在回答我自己的问题.该问题已通过生成中提到的签名密钥解决https://facebook.github.io/react-native/docs/signed-apk-android.html.

I am answering on my own question. The issue has been solved by generating a signing key as mentioned in https://facebook.github.io/react-native/docs/signed-apk-android.html .

这篇关于React Native:包解析错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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