android - Lint 在组装发布目标时发现致命错误,添加语言 xml 文件
问题描述
我刚刚在我的 Android Studio 项目中为另一种语言添加了一个新的 xml 文件。构建项目时出现错误:
Lint found fatal errors while assembling a release target.
To proceed, either fix the issues identified by lint, or modify your build script as follows: ... android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
} }
解决方案
我发现翻译人员输入了错误的资源名称。例如,它必须在哪里
<string name="Example">"This is an example"</string>
他打字
<string name="Exmple">"This is an example"</string>
因此,“示例”与“示例”不同。Android Studio 可以提供有关该错误的更多信息。我花了几个小时才知道。xml 文件有数百个字符串资源。像“资源示例未以默认语言定义”这样的错误行就足够了。
推荐阅读
- php - PHP获取完整的url,包括我想跳转到的页面部分
- github - 在另一个目录中运行操作
- python - Python比较每一行,如果它具有相同的值A,则加上值B
- c++ - bazel 中的错误“名称‘new_local_repository’未定义”
- mysql - 在 spark 2.x 中,除了使用 DF.write.mode().jdbc().....,如何将 Dataframe 数据写入 mysql
- python - 如何将系列与数据框合并,同时保留双方的数据
- python - scipy ndimage 没有属性过滤器?
- c# - 控制器中特定“异步”操作的 Autofac 过滤器不起作用
- julia - Julia 的累积集成选项
- c# - 如何访问表单的位置属性?