任务':app:mergeDebugResources'com.android.builder.internal.aapt.v2.Aapt2InternalException的执行失败:

时间:2019-08-14 14:05:14

标签: android-studio gradle teamcity

我正在尝试使用TeamCity中的gradle运行一个简单的Android Studio项目的干净构建。

它运行一些任务,但随后停止并返回此错误:

Execution failed for task ':app:mergeDebugResources'.     
com.android.ide.common.workers.WorkerExecutorException: 8 exceptions 
were raised by workers:
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 
aapt2-3.4.2-5326820-windows Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue 
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 
aapt2-3.4.2-5326820-windows Daemon #1: Daemon startup failed
This should not happen under normal circumstances, please file an issue 
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 
aapt2-3.4.2-5326820-windows Daemon #2: Daemon startup failed
This should not happen under normal circumstances, please file an issue 
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 
aapt2-3.4.2-5326820-windows Daemon #3: Daemon startup failed
This should not happen under normal circumstances, please file an issue 
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 
aapt2-3.4.2-5326820-windows Daemon #4: Daemon startup failed
This should not happen under normal circumstances, please file an issue 
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 
aapt2-3.4.2-5326820-windows Daemon #5: Daemon startup failed
This should not happen under normal circumstances, please file an issue 
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 
aapt2-3.4.2-5326820-windows Daemon #6: Daemon startup failed
This should not happen under normal circumstances, please file an issue 
if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 
aapt2-3.4.2-5326820-windows Daemon #7: Daemon startup failed
This should not happen under normal circumstances, please file an issue 
if it does.

它无法克服此错误,并且无法成功对其进行干净的构建。

1 个答案:

答案 0 :(得分:0)

我无法发表评论,所以我只留下一个答案,希望它能在某些方面对您有所帮助。

您的完整项目目录是什么?可能是由于路径名太长所致。

尝试重新启动ADB,项目,直到PC重启也可以正常工作

您对目录有足够的权限吗?

尝试将其添加到您的build.gradle

android{ aaptOptions.cruncherEnabled = false aaptOptions.useNewCruncher = false }

最后尝试通过转到Build> Rebuild project来重建项目。甚至可以通过Build> clean project进行清理。

让我知道是否有任何工作。快乐编码:)