react-native - React Native Android build:进程'command'npx.cmd''以非零退出值1完成
问题描述
尝试为我的项目生成 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
推荐阅读
- aws-glue - AWS Glue 2.0,本地pyspark开发,测试混乱
- google-cloud-platform - 如何从 Apache Beam(谷歌云数据流)中的列字符串中删除特殊字符,包括逗号、引号
- tensorflow - 动态 RNN 在 Eager 模式下工作于模棱两可的形状张量,但不适用于图形模式
- actions-on-google - 意图中的 Google Action 自定义名称
- numpy - numpy - 为什么均值和 SD 对于相同的值不稳定?
- flutter - 允许在新的集成测试中运行整个测试文件夹——就像普通的单元测试一样
- python - Selenium 在特定路径中启动浏览器(例如 ./firefox/firefox.exe)(Python3)
- php - WPRobot 无法从 IIS 服务器复制图像
- isabelle - 如何在 Windows 10 上将 MMT 注册为 Isabelle 组件(调用 isabelle mmt_build)?
- c - 为什么我不断收到 LNK2005/C 中的重复项