react-native - 任务 :app:generateBundledResourcesHashRelease 在构建 relese apk react-native 时失败
问题描述
安装 react-native-code-push 后我遇到了这个错误。
Task :app:generateBundledResourcesHashRelease FAILED
internal/fs/utils.js:230
throw err;
^
Error: ENOENT: no such file or directory, scandir '/home/ayush/Desktop/awsproject/android/app/build/generated/res/react/release'
at Object.readdirSync (fs.js:872:3)
at getFilesInFolder (/home/ayush/Desktop/awsproject/node_modules/react-native-code-push/scripts/getFilesInFolder.js:7:26)
at Object.<anonymous> (/home/ayush/Desktop/awsproject/node_modules/react-native-code-push/scripts/generateBundledResourcesHash.js:38:1)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
errno: -2,
syscall: 'scandir',
code: 'ENOENT',
path: '/home/ayush/Desktop/awsproject/android/app/build/generated/res/react/release'
}
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:generateBundledResourcesHashRelease'.
> Process 'command 'node'' 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 36s
52 actionable tasks: 52 executed
解决方案
推荐阅读
- sql - 获取SQL中所有表的列名
- reactjs - PropType 已定义但从未使用过 eslint 错误
- linux - 文件未列出 git status 并在提交后丢失
- c# - 如何以正确的格式拆分字符串
- python - 在另一台 PC 上运行 python 脚本
- java - 无法克隆数据
- maven - 是否可以创建命名空间或逻辑组来对 GraphQL 中的查询/突变进行分组?
- javascript - 想要在警报框中的 jsp 页面上显示控制器消息
- github - GitHub 抛出“GitHug 无法构建页面”错误,这是为什么呢?
- java - 导航到列表 Cardview 中的不同活动