【发布时间】:2020-03-22 17:45:26
【问题描述】:
我已经尝试了多种在线解决方案,但无法使构建工作
我收到任务“:app:mergeReleaseResources”的执行失败。
FAILURE:构建失败并出现异常。
-
出了什么问题: 任务 ':app:mergeReleaseResources' 执行失败。
[原始/应用程序] C:\Users\Lenovo\Documents\GitHub\Marist-Mobile-App\android\app\src\main\res\raw\app.json [原始/应用程序] C:\Users\ Lenovo\Documents\GitHub\Marist-Mobile-App\android\app\build\generated\res\react\release\raw\app.json: 错误:资源重复
尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。
通过https://help.gradle.org获得更多帮助
在 3m 24s 内构建失败
at checkExecSyncError (child_process.js:616:11)
at execFileSync (child_process.js:634:15)
at runOnAllDevices (C:\Users\Lenovo\Documents\GitHub\Marist-Mobile-App\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Users\Lenovo\Documents\GitHub\Marist-Mobile-App\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\Lenovo\Documents\GitHub\Marist-Mobile-App\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:89:5)
at async Command.handleAction (C:\Users\Lenovo\Documents\GitHub\Marist-Mobile-App\node_modules\@react-native-community\cli\build\cliEntry.js:160:7)
我不知道该怎么办
使用--info
> Task :app:bundleReleaseJsAndAssets FAILED
:app:bundleReleaseJsAndAssets (Thread[Execution worker for ':',5,main]) 完成。耗时 2 分钟 2.218 秒。
FAILURE:构建失败并出现异常。
- 出了什么问题:
任务 ':app:bundleReleaseJsAndAssets' 执行失败。
进程 'command 'cmd'' 以非零退出值 1 结束 空闲
尝试::bundleReleaseJsAndAssets 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。
通过https://help.gradle.org获得更多帮助
在 2m 35s 内构建失败 3 个可操作的任务:1 个已执行,2 个是最新的
谁能帮帮我...
【问题讨论】:
-
能否在使用 --info build 时显示错误信息
-
我已经更新了 --info build
-
尝试使用 ./gradew build --info 构建android项目
标签: android reactjs react-native react-native-android