进程'命令'npx.cmd''完成,退出值非零 1 反应本机构建问题

进程'命令'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