在运行ionic build android时出现mergeDebugResources错误 [英] Getting mergeDebugResources error while running ionic build android

查看:78
本文介绍了在运行ionic build android时出现mergeDebugResources错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行 ionic build android 命令时出现以下错误.我花了几个小时来搜索它,但无法获得任何解决方案.请帮助大家.

I am getting following error while running ionic build android command. I spent hours to google it, but could not get any solution. Please help guys.

失败:构建失败,并出现异常.

FAILURE: Build failed with an exception.

任务':mergeDebugResources'执行任务失败. D:\ Ionic_Workspace \ MyProject_Dev \ MyProject_Workspace_1.1 \ MyProject 1.1 \ platforms \和 oid \ build \ intermediates \ exploded-aar \ com.google.android.gms \ play-services-base \ 9.6.1 \ res \ drawable-t vdpi-v4 \ common_google_signin_btn_text_light_disabled.9.png:错误: Windows上的文件路径过长,请输入240个字符以下的字符: D:\ Ionic_Workspace \ MyProject_Dev \ MyProject_Workspace_1.1 \ MyProject 1.1 \ platforms \ android \ build \ intermediates \ exploded-aar \ com.google.android.gms \ play-services-b ase \ 9.6.1 \ res \ drawable-tvdpi-v4 \ common_google_signin_btn_text_light_disabled.9.png

What went wron Execution failed for task ':mergeDebugResources'. D:\Ionic_Workspace\MyProject_Dev\MyProject_Workspace_1.1\MyProject 1.1\platforms\and roid\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\9.6.1\res\drawable-t vdpi-v4\common_google_signin_btn_text_light_disabled.9.png: Error: File path too long on Windows, ke ep below 240 characters : D:\Ionic_Workspace\MyProject_Dev\MyProject_Workspace_1.1\MyProject 1.1\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-b ase\9.6.1\res\drawable-tvdpi-v4\common_google_signin_btn_text_light_disabled.9.png

尝试:使用--stacktrace选项运行以获取堆栈跟踪.与运行 --info或--debug选项可获取更多输出信息.错误:cmd:命令失败,退出代码为1错误输出:FAILURE:构建失败,并带有

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more l og output. Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

出了什么问题:任务':mergeDebugResources'的执行失败. D:\ Ionic_Workspace \ MyProject_Dev \ MyProject_Workspace_1.1 \ MyProject 1.1 \ platforms \和 oid \ build \ intermediates \ exploded-aar \ com.google.android.gms \ play-services-base \ 9.6.1 \ res \ drawable-t vdpi-v4 \ common_google_signin_btn_text_light_disabled.9.png:错误: Windows上的文件路径过长,请输入240个字符以下的字符: D:\ Ionic_Workspace \ MyProject_Dev \ MyProject_Workspace_1.1 \ MyProject 1.1 \ platforms \ android \ build \ intermediates \ exploded-aar \ com.google.android.gms \ play-services-b ase \ 9.6.1 \ res \ drawable-tvdpi-v4 \ common_google_signin_btn_text_light_disabled.9.png

What went wrong: Execution failed for task ':mergeDebugResources'. D:\Ionic_Workspace\MyProject_Dev\MyProject_Workspace_1.1\MyProject 1.1\platforms\and roid\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\9.6.1\res\drawable-t vdpi-v4\common_google_signin_btn_text_light_disabled.9.png: Error: File path too long on Windows, ke ep below 240 characters : D:\Ionic_Workspace\MyProject_Dev\MyProject_Workspace_1.1\MyProject 1.1\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-b ase\9.6.1\res\drawable-tvdpi-v4\common_google_signin_btn_text_light_disabled.9.png

Try:使用--stacktrace选项运行以获取堆栈跟踪.与运行 --info或--debug选项可获取更多输出消息.

Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more l og output.

推荐答案

我的朋友验证了错误堆栈,并且他确定了问题

My friend verified error stack, and he identified a problem

让我们通过上面错误中提到的那一行,

Let us go through line which is mentioned in error above,

错误:Windows上的文件路径太长,请保持240个字符以下:

Error: File path too long on Windows, keep below 240 characters :

因此,基本上Windows仅允许路径限制为240个字符.因此,他更新了项目的路径,最后我们解决了问题.希望对别人有帮助!

So basically Windows only allows 240 character limit for a path. So he updated path for project and finally we solved the problem. Hope it will help somebody!!

这篇关于在运行ionic build android时出现mergeDebugResources错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆