The app crashes every time you try to select a second file and is limited to one file .countable(false) & maxSelectable(1).
The error text doesn't seem to be bundled with the library for some reason.
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/zhihu/matisse/R$plurals;
at com.zhihu.matisse.internal.model.SelectedItemCollection.isAcceptable(SelectedItemCollection.java:175)
at com.zhihu.matisse.internal.ui.adapter.AlbumMediaAdapter.assertAddSelection(AlbumMediaAdapter.java:206)
at com.zhihu.matisse.internal.ui.adapter.AlbumMediaAdapter.onCheckViewClicked(AlbumMediaAdapter.java:185)
at com.zhihu.matisse.internal.ui.widget.MediaGrid.onClick(MediaGrid.java:71)
at android.view.View.performClick(View.java:6896)
at android.view.View$PerformClick.run(View.java:26088)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6940)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Reproducing the issue described by OP.
The cause seem to be referencing R.plurals.xxx in the file SelectedItemCollection.java
Version 0.5.0 beta 9
For those who really need a fix before maintainer resolves this one:
Add the following lines to your strings.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>
and attempting to select more than limited number of media files should produce the toast properly.
Thanks @jilulu ... that fixed it for me :)
Most helpful comment
For those who really need a fix before maintainer resolves this one:
Add the following lines to your strings.xml
and attempting to select more than limited number of media files should produce the toast properly.