最近更新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。
然后进可以愉快的打包了,我的项目是这样解决的,不知道能不能帮到你呢?