进程'命令'npx.cmd''完成,退出值非零 1 反应本机构建问题 [英] Process 'command 'npx.cmd'' finished with non-zero exit value 1 React native build problem

查看:203
本文介绍了进程'命令'npx.cmd''完成,退出值非零 1 反应本机构建问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究本机反应.当我尝试使用

I am working on react native. When i try to create a build of android using

gradlew assembleRelease

然后得到一个

* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'npx.cmd'' finished with non-zero exit value 1

但是当我使用下面的命令构建成功构建构建

But when i create a build using below command build succesfully build

gradlew assembleRelease -x bundleReleaseJsAndAssets 

但构建无法在移动设备上运行,因为我在安装后打开我的应用程序崩溃了.

But build not run on mobile device as i am opening my app after install it just crashed.

此外,当我尝试使用相同的代码在不同的系统(8gm ram)上创建构建时,它会使用相同的命令创建构建,并且构建将成功创建.给我一个解决方案,

Also when i try to create build on different System (8gm ram) with same code then it creates build with same command and the build will successfully created. Provide me a solution for this,

推荐答案

use cd android

之后使用这个./gradlew clean

和 apk ./gradlew assembleRelease -x bundleReleaseJsAndAssets

或将其用于 aab ./gradlew bundleRelease -x bundleReleaseJsAndAssets

试试这些命令,请告诉我它是否有效

Try these commands and please tell me if it works

这篇关于进程'命令'npx.cmd''完成,退出值非零 1 反应本机构建问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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