打包出现错误Error:MissingTranslation 和 ResourceName

来源:互联网 发布:账户系统数据接口规范 编辑:程序博客网 时间:2024/06/17 19:20

今天安卓应用打包的时候出现了俩个报错的问题,在这里记录总结一下:

问题一:

Error:(5) Error: "xxx" is not translated in "en" (English), "es" (Spanish) [MissingTranslation]


像这种类型的问题:Error:(5) Error: "hello_blank_fragment" is not translated in "en" (English), "es" (Spanish) [MissingTranslation]

解决方案就是在 ./values/strings 文件中的根节点<resource>中添加:

xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"
问题二:

Error:Resource named 'xxx' does not start with the project's resource prefix 'xxx'; rename to 'xxx'?[ResourceName]
像这种类型的问题:Error:Resource named 'activity_img_sel' does not start with the project's resource prefix 'imgsel'; rename to 'imgselActivity_img_sel'?[ResourceName]


像这种类型的问题:Error:Resource named 'activity_img_sel' does not start with the project's resource prefix 'imgsel'; rename to 'imgselActivity_img_sel'?[ResourceName]

解决方案:


阅读全文
2 0