当前位置:首页 > 移动开发 > Android resource compilation failed

Android resource compilation failed

6个月前 (05-26)71

记录一下。今天编译项目,一直报错。

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':CsliyuEnglishWordGao:mergeDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
   > Resource compilation failed. Check logs for details.

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':CsliyuEnglishWordGao:mergeDebugResources'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:147)
    at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:145)
 

如果Android studio编译项目,提示这个错误。 肯定就是res下的某个资源文件有问题。如果没有提示具体的错误文件位置,通常情况下,就是values下面的string文件有问题,逐个检查一下。 我今天就是因为string.xml里面,定义的一个字符串有特殊字符" ' "。做一下处理,特殊字符前面加一个

“ \' ”就可以正常编译了。

作者:liuyangccsu2016
来源链接:https://blog.csdn.net/liuyangccsu2016/article/details/124111793

“Android resource compilation failed” 的相关文章

Android's HttpURLConnection throws EOFException

java.io.EOFExceptionat java.util.zip.GZIPInputStream.readFully 解决方法:  appe...

springcloud本地启动指定profile后错误If you are using the git profile, you need to set a Git URI in your configuration.

配置中心指定profile后启动报错 2020-04-22 14:35:48.306 ERROR 22828 --- [ restartedMain] o.s.b.we...

Android 混淆问题排查

Android 混淆问题排查

问题 近期在开发过程中,突然出现混淆后程序出现运行时异常,编译是正常的,不混淆也是正常的, 错误信息如下提示 12-07 14:10:2...

com.ibatis.common.jdbc.exception.NestedSQLException:Error setting property...

今天一直配Ibatis的时候一直报这个错误,用的是Oracle数据库。 com.ibatis.common.jdbc.exception.NestedSQLExcepti...

Error creating bean with name 'unMblTotController': 注入失败

  今天新来的小伙子,进公司做项目,然后自己新建了包,出了以下错误 y.UnsatisfiedDependencyException: Error&nbs...

spring boot启动时报错Error creating bean with name 'dataSource' defined in class path resource

  报这种错的原因在于spring boot默认会加载org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfigur...

严重: StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'goodsController' defined in file [D:\eclipse\eclipse-space\pinyougou_parent\pinyou

严重: StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'goodsController' defined in file [D:\eclipse\eclipse-space\pinyougou_parent\pinyou

  由于错误太宽,没法截取完整的,所以不怎么连贯,但是不影响错误的解决。 这个错误是因为service无法自动注入。显示嵌套状态异常。 我就查看了一下...

error: no matching function for call to 'std::exception:exception(const char[15])'

在复现《剑指offer》代码段: throw new exception("queue is empty"); 时,遇到: error: n...

Error creating bean with name 解决

报错:Error creating bean with name 解决 报错原因: 未开启注解扫描; 未设置注解扫描的包路...

Error  Exception

Error Exception

error exception 原文地址:http://www.cnblogs.com/with-wang/archive/2012/03/24/java_doc_3....