前言
最近在改公司的Android老项目,使用到了知乎的图片选择器框架
Matisse。
问题
因为要做部分功能修改,所以选择手动引入的方式,按照正常流程添加库进去就遇到了一下问题:
matisse/src/main/java/com/zhihu/matisse/internal/model/SelectedItemCollection.java:176: 错误: 找不到符号
R.plurals.error_over_count,
根据错误进入到相应类中查看异常
The plurals "error_over_count" in values-ru has no declaration in the base values folder; this can lead to crashes when the resource is queried in a configuration that does not match this qualifier
其实错误提示介绍的很清楚了:
在
values ru中的error_over_count在base values文件夹中没有声明.
当在与此限定符不匹配的配置中查询资源时,这可能会导致崩溃。
所以我们找到 matisse ---> res ---> values ---> strings.xml 中 加入一下代码即可:
<plurals name="error_over_count">
<item quantity="one">Можно выбрать не более %1$d файла</item>
<item quantity="few">Можно выбрать не более %1$d файлов</item>
<item quantity="many">Можно выбрать не более %1$d файлов</item>
<item quantity="other">Можно выбрать не более %1$d файлов</item>
</plurals>
再次运行,成功了。








网友评论