qingmei2 / RxImagePicker

:rocket:RxJava2 and RxJava3 external support. Android flexible picture selector, provides the support for theme of Zhihu and WeChat (灵活的Android图片选择器,提供了知乎和微信主题的支持).
MIT License
1.2k stars 155 forks source link

华为android10.0系统打开相册直接就崩溃 #82

Closed daquanzheng closed 4 years ago

daquanzheng commented 4 years ago

华为部分手机 android10.0系统打开相册直接就崩溃了!报错信息: Caused by: android.database.sqlite.SQLiteException: near "GROUP": syntax error (Sqlite code 1 SQLITE_ERROR): , while compiling: SELECT _id, bucket_id, bucket_display_name, _data, COUNT(*) AS count FROM files WHERE ((owner_package_name IN ( 'com.mayi.video' ) OR media_type=2 OR media_type=4 OR media_type=0 AND mime_type LIKE 'audio/%' OR media_type=3 OR media_type=0 AND mime_type LIKE 'video/%' OR media_type=1 OR media_type=0 AND mime_type LIKE 'image/%') AND (is_pending=0) AND (is_trashed=0) AND (volume_name IN ( 'external_primary' ))) AND ((media_type=? AND _size>0) GROUP BY (bucket_id)) ORDER BY datetaken DESC, (OS error - 2:No such file or directory)

daquanzheng commented 4 years ago

我用的是2.5.2版本 项目在28以下编译运行没有问题,但是最高版本设为29 即android10 打开相册就会闪退!报错内容为:java.lang.NoSuchMethodError: No virtual method placeholder(Landroid/graphics/drawable/Drawable;)Lcom/bumptech/glide/request/BaseRequestOptions; in class Lcom/bumptech/glide/request/RequestOptions; or its super classes (declaration of 'com.bumptech.glide.request.RequestOptions' appears in /data/app/com.mayi.video-K6N-r3bsbpzcYBLWsXYSBw==/base.apk),求博主解答下是什么原因?

daquanzheng commented 4 years ago

问题已得到解决!具体原因是我用的glide库是4.8.0版本的,而你的库用的是4.10.0版本的,4.8.0版本glide没有placeholder方法,故发生闪退!我将本地glide版本修改为4.10.0之后问题得到解决!