Execution failed for task ‘:app:processDebugResources‘. > A failure occurred while executing com.and

Posted 彬sir哥

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Execution failed for task ‘:app:processDebugResources‘. > A failure occurred while executing com.and相关的知识,希望对你有一定的参考价值。

android studio的报错提示:

> Task :app:processDebugResources FAILED
AGPBI: "kind":"error","text":"Android resource linking failed","sources":["file":"C:\\\\Users\\\\Administrator\\\\.gradle\\\\wrapper\\\\dists\\\\gradle-6.7.1-all\\\\caches\\\\transforms-2\\\\files-2.1\\\\4bc395114f57931320ace6dae20d2b04\\\\support-compat-27.1.1\\\\res\\\\values\\\\values.xml","position":"startLine":15,"startColumn":4,"startOffset":880,"endLine":18,"endColumn":207,"endOffset":1240],"original":"ERROR:C:\\\\Users\\\\Administrator\\\\.gradle\\\\wrapper\\\\dists\\\\gradle-6.7.1-all\\\\caches\\\\transforms-2\\\\files-2.1\\\\4bc395114f57931320ace6dae20d2b04\\\\support-compat-27.1.1\\\\res\\\\values\\\\values.xml:16:5-19:208: AAPT: error: resource android:attr/fontStyle not found.\\n    ","tool":"AAPT"
AGPBI: "kind":"error","text":"Android resource linking failed","sources":["file":"C:\\\\Users\\\\Administrator\\\\.gradle\\\\wrapper\\\\dists\\\\gradle-6.7.1-all\\\\caches\\\\transforms-2\\\\files-2.1\\\\4bc395114f57931320ace6dae20d2b04\\\\support-compat-27.1.1\\\\res\\\\values\\\\values.xml","position":"startLine":15,"startColumn":4,"startOffset":880,"endLine":18,"endColumn":207,"endOffset":1240],"original":"ERROR:C:\\\\Users\\\\Administrator\\\\.gradle\\\\wrapper\\\\dists\\\\gradle-6.7.1-all\\\\caches\\\\transforms-2\\\\files-2.1\\\\4bc395114f57931320ace6dae20d2b04\\\\support-compat-27.1.1\\\\res\\\\values\\\\values.xml:16:5-19:208: AAPT: error: resource android:attr/font not found.\\n    ","tool":"AAPT"
AGPBI: "kind":"error","text":"Android resource linking failed","sources":["file":"C:\\\\Users\\\\Administrator\\\\.gradle\\\\wrapper\\\\dists\\\\gradle-6.7.1-all\\\\caches\\\\transforms-2\\\\files-2.1\\\\4bc395114f57931320ace6dae20d2b04\\\\support-compat-27.1.1\\\\res\\\\values\\\\values.xml","position":"startLine":15,"startColumn":4,"startOffset":880,"endLine":18,"endColumn":207,"endOffset":1240],"original":"ERROR:C:\\\\Users\\\\Administrator\\\\.gradle\\\\wrapper\\\\dists\\\\gradle-6.7.1-all\\\\caches\\\\transforms-2\\\\files-2.1\\\\4bc395114f57931320ace6dae20d2b04\\\\support-compat-27.1.1\\\\res\\\\values\\\\values.xml:16:5-19:208: AAPT: error: resource android:attr/fontWeight not found.\\n    ","tool":"AAPT"

Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > Android resource linking failed
     ERROR:C:\\Users\\Administrator\\.gradle\\wrapper\\dists\\gradle-6.7.1-all\\caches\\transforms-2\\files-2.1\\4bc395114f57931320ace6dae20d2b04\\support-compat-27.1.1\\res\\values\\values.xml:16:5-19:208: AAPT: error: resource android:attr/fontStyle not found.

* 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.



报错信息看来可能是依赖包的问题
我刚添加依赖包了:

implementation 'com.github.bumptech.glide:glide:4.7.1'

这依赖包版本4.7.1可能引用androidx库,4.7.1回退到多少(去百度找直接复制,不能自己乱写)才能引用android库,应该没问题

以上是关于Execution failed for task ‘:app:processDebugResources‘. > A failure occurred while executing com.and的主要内容,如果未能解决你的问题,请参考以下文章

Execution failed for task ':app:processDebugResources'

Execution failed for task ':compileDebugAidl'.

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

Android 报错:Execution failed for task ‘:app:compileDebugJavaWithJavac‘

Error:Execution failed for task app怎么解决

Execution failed for task ‘:xxx:generateReleaseRFile‘.