gpt4 book ai didi

react-native - React Native Android build : Process 'command ' npx. cmd'' 以非零退出值 1 完成

转载 作者:行者123 更新时间:2023-12-03 14:39:50 27 4
gpt4 key购买 nike

尝试为我的项目生成 APK 时,我不断收到此错误。我使用 react native 0.61.5 并且我没有安装任何库。

C:\Users\Ali\Desktop\Desktop\My work\ReactNative\AwesomeProject61\android>gradle
w bundleRelease

> Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Loading dependency graph, done.
info Writing bundle output to:, C:\Users\Ali\Desktop\Desktop\My
info Writing sourcemap output to:, C:\Users\Ali\Desktop\Desktop\My
info Done writing sourcemap output
info Done writing bundle output
info Copying 1 asset files
Error: EEXIST: file already exists, mkdir 'C:\Users\Ali\Desktop\Desktop\My'
error EEXIST: file already exists, mkdir 'C:\Users\Ali\Desktop\Desktop\My'. Run
CLI with --verbose flag for more details.

> Task :app:bundleReleaseJsAndAssets FAILED

FAILURE: Build failed with an exception.

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

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 14s
1 actionable task: 1 executed

C:\Users\Ali\Desktop\Desktop\My work\ReactNative\AwesomeProject61\android>

最佳答案

您是否尝试过清洁 Gradle?

请试试这个命令 cd android && ./gradlew clean在您项目的根目录上运行此命令!或 ./gradlew clean在您项目的 android 文件夹中。

之后重新编译 App 。

如果上述解决方案没有帮助,请尝试使用此命令构建您的版本,转到您的 android 文件夹并运行命令 ./gradlew assembleRelease -x bundleReleaseJsAndAssets

关于react-native - React Native Android build : Process 'command ' npx. cmd'' 以非零退出值 1 完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59695135/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com