java.lang.NoClassDefFoundError: Failed resolution of: Lcom/zhihu/matisse/R$plurals

今天在跑公司的项目的时候发现matisse选择相册中图片时候超过9张继续点击其它图片会crash,于是乎在log上找到了标题中所提到的crash信息
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/zhihu/matisse/R$plurals
通过这个信息能看得出来是缺少资源定义,因为其中提到了R,所以就通过这个方向进行了一番搜索,终于找到解决方案就是在项目的string.xml资源文件添加上如下代码就能解决

 <plurals name="error_over_count">
        <item quantity="one">You can only select one media file</item>
        <item quantity="many">You can only select up to %1$d media files</item>
    </plurals>

希望这篇文件能帮到你。

1 1 投票
文章评分
订阅评论
提醒
guest
0 评论
内联反馈
查看所有评论
京ICP备17066706号-1
0
希望看到您的想法,请您发表评论x