简体   繁体   English

在本机构建失败

[英]Build Failed in react-native

I have successfully created and build the app using the react-native framework, but not able to install directly using the cmd as react-native run-android as its showing the path error. 我已经使用react-native框架成功创建和构建了该应用程序,但是无法使用cmd作为react-native run-android直接安装,因为它显示路径错误。

my path is app\\build\\outputs\\apk\\debug\\apk-debug.apk, 我的路径是app \\ build \\ outputs \\ apk \\ debug \\ apk-debug.apk,

but its showing as app\\build\\outputs\\apk\\apk-debug.apk. 但显示为app \\ build \\ outputs \\ apk \\ apk-debug.apk。

So while installation its showing, not able to install due to no such file or directory 因此,在显示安装过程中,由于没有此类文件或目录而无法安装

Also showing the error type:3 同时显示错误类型:3

It may be duplicate question for you, but i have tried all the ways but all in vain. 对于您来说,这可能是重复的问题,但是我尝试了所有方法,但是徒劳无功。 If possible help, before marking it as duplicate 如果有帮助,请将其标记为重复

finally I got the answer. 终于我得到了答案。

This type of error comes in react-native while you are installing the apk by the cmd to mobile by command react-native run-android --deviceID "xxxxxxx" 当您通过命令react-native run-android --deviceID“ xxxxxxx”将cmd将apk安装到移动设备时,此类型的错误会在react-native中出现

Instead of run directly as react-native run-android. 而不是直接作为react-native run-android运行。

You might get error as "unknown API level", then its mean you have to update the android studio build tools based on the required platform. 您可能会因为“未知API级别”而收到错误消息,这意味着您必须根据所需平台更新android studio构建工具。 I suggest to install all the build tools above 24, as it supports all the android mobile. 我建议安装24以上的所有构建工具,因为它支持所有android mobile。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM