react-nativeandroid-bundle

Process 'command 'npx.cmd'' finished with non-zero exit value 1 React native build problem


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

gradlew assembleRelease

then getting an

* 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.

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,


Solution

  • use cd android

    after that use this ./gradlew clean

    and for apk ./gradlew assembleRelease -x bundleReleaseJsAndAssets

    or use this for aab ./gradlew bundleRelease -x bundleReleaseJsAndAssets

    Try these commands and please tell me if it works