您的位置:首页 > 移动开发

Android studio打包App报错:Error:(4) Error: "app_name" is not translated in "ar" (Arabic), "cs" (Czech)

2018-02-04 13:10 701 查看
最近更新Android studio的版本2.3.3

但是,接踵而来的也有很多问题,其中就有一个,运行项目到手机上时一点问题都没有,一但我导包Apk,问题就来了!



我上网查了很多资料,也有解决的方法,写的也很详细,但都是针对Eclipse的项目,没有针对Android studio的,后来看到一个方法:在报错的地方加上

xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation"

刚开始我加上了,这个代码,但是还是报错,后来我仔细看了看,报错的地方又不一样了,因为我导入的有依赖包,于是,我把所有报错的地方都加上了代码::

<resources
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation"
>

<string name="pull_to_refresh_pull_label">Pull to refresh…</string>
<string name="pull_to_refresh_release_label">Release to refresh…</string>
<string name="pull_to_refresh_refreshing_label">Loading…</string>

<!-- Just use standard Pull Down String when pulling up. These can be set for languages which require it -->
<string name="pull_to_refresh_from_bottom_pull_label">@string/pull_to_refresh_pull_label</string>
<string name="pull_to_refresh_from_bottom_release_label">@string/pull_to_refresh_release_label</string>
<string name="pull_to_refresh_from_bottom_refreshing_label">@string/pull_to_refresh_refreshing_label</string>

</resources>

加上之后,就要在我们想要打包的项目中的选项 Build 进行 Clean Project。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐