今天在跑公司的项目的时候发现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>
希望这篇文件能帮到你。