android studio中遇到资源错误Resource compilation failed怎么弄?

时间:2025-03-09 12:22:18

问题描述:

在使用android studio编写代码的时候出现下面的问题

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':doctormodule:compileDebugLibraryResources'.
> A failure occurred while executing $CompileLibraryResourcesAction
   > There was a failure while executing work items
      > A failure occurred while executing
         > Resource compilation failed. Check logs for details.

* 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

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 /6.8/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 11s。

解决方案:

首先我根据指示,点击Run with --info or --debug option
但是内容太多,一闪而过。

回想起自己主要是更改了xml资源文件,更改的资源也不多,于是一个个的找。找到了其中的错误。

后来又遇到了这个问题,我发现,在problems选项卡的build output中,可以找到出问题的资源,快速定位解决问题。
一个个找也能找到,但浪费时间。

关于:

编者:李国帅

qq:9611153 微信lgs9611153

时间:2021-11-21