Android APK编译错误01

来源:互联网 发布:湖北广电网络最新消息 编辑:程序博客网 时间:2024/06/05 01:59

Android签名时报如下错误:

Error:(4) Error: "launcher_name" is not translated in "de" (German), "es" (Spanish), "fr" (French), "hu" (Hungarian), "ja" (Japanese), "ko" (Korean) [MissingTranslation]

Error:(3) Error: "app_name" is not translated in "de" (German), "es" (Spanish), "fr" (French), "hu" (Hungarian), "ja" (Japanese), "ko" (Korean) [MissingTranslation]

Error:(5) Error: "activity_name" is not translated in "de" (German), "es" (Spanish), "fr" (French), "hu" (Hungarian), "ja" (Japanese), "ko" (Korean) [MissingTranslation]

解决方法: 

报错时文件是这样的

<resources>       <string name="app_name">pics</string>    <string name="hello_world">Hello world!</string>    <string name="action_settings">Settings</string></resources>

在当前String资源文件中加上

resources xmlns:tools="http://schemas.android.com/tools"  tools:ignore="MissingTranslation"
添加后变成这样

<resources xmlns:tools="http://schemas.android.com/tools"  tools:ignore="MissingTranslation">    tools:ignore="MissingTranslation"    <string name="app_name">pics</string>    <string name="hello_world">Hello world!</string>    <string name="action_settings">Settings</string></resources>
ok,错误解决了
























0 0