我是靠谱客的博主 可耐大雁,最近开发中收集的这篇文章主要介绍AndroidStudio编译报错org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:proces,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
AndroidStudio编译报错
org.gradle.api.tasks.TaskExecutionException: Execution failed for task
':app:processDebugResources'.
Android resource compilation failed Output:
D:companySuperMarketappbuildintermediatesincremen
Caused by: org.gradle.tooling.BuildException:
Failed to process resources, see aapt output above for
Process 'command 'C:SDKbuild-tools28.0.3aapt.exe''
finished with non-zero exit value 1
先说一个经验,这类问题往往是xml文件有问题。
如何定位问题
打开AndroidStudio的terminal,在命令行输入命令:gradlew compileDebugSource --stacktrace -info
或gradlew assembleDebug --info
mac linux系统输入:./gradlew compileDebugSource --stacktrace -info
然后可以在命令行查看具体的编译报告信息,编译内容有很多,耐心向下看,会发现一段非常明显的错误提示:
错误所在文件、原因都非常详细。
编译信息最下面就是build窗口的报错信息:
...
D:companySuperMarketappsrcmainreslayoutitem_c_day_manager_layout.xml:51:46-61: AAPT: No resource found that matches the given name (at 'layout_constraintLeft_toRightOf' with value
'@id/tv_work_num').
...
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugResources'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34
...
最后
以上就是可耐大雁为你收集整理的AndroidStudio编译报错org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:proces的全部内容,希望文章能够帮你解决AndroidStudio编译报错org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:proces所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复