Matisse is a beautiful Android image and video selector from Zhihu open source. Its main functions are:
Select images in JPEG, PNG and GIF formats and videos in MPEG and MP4 formats
Support for custom themes, including two built-in themes
Different picture loaders
Define user-defined filtering rules
Good for use with Activities and Fragments
However, there will be some problems when adapting android10, as shown in
at androidx.loader.content.ModernAsyncTask$3.done(ModernAsyncTask.java:164) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383) at java.util.concurrent.FutureTask.setException(FutureTask.java:252) at java.util.concurrent.FutureTask.run(FutureTask.java:271) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:929) 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 ((is_pending=0) AND (is_trashed=0) AND (volume_name IN ( 'external_primary' ))) AND (((media_type=? OR media_type=?) AND _size>0) GROUP BY (bucket_id)) ORDER BY datetaken DESC, (OS error - 2:No such file or directory) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:184) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140) at android.content.ContentProviderProxy.query(ContentProviderNative.java:423) at android.content.ContentResolver.query(ContentResolver.java:955) at android.content.ContentResolver.query(ContentResolver.java:891) at androidx.core.content.ContentResolverCompat.query(ContentResolverCompat.java:81) at androidx.loader.content.CursorLoader.loadInBackground(CursorLoader.java:63) at com.zhihu.matisse.internal.loader.AlbumLoader.loadInBackground(AlbumLoader.java:97) at com.zhihu.matisse.internal.loader.AlbumLoader.loadInBackground(AlbumLoader.java:33) at androidx.loader.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:307) at androidx.loader.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:60) at androidx.loader.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:48) at androidx.loader.content.ModernAsyncTask$2.call(ModernAsyncTask.java:141) at java.util.concurrent.FutureTask.run(FutureTask.java:266)Copy the code
New version has to solve this problem, but when used with GrowingIO still complains, online most of the solution to reduce the gradle version 4.4, however, as for the new version of the function, the result is an estimate of especially, at the time of a third party framework is more, so should try to improve the third party version of adaptation, this Upgrade the old version of 0.8.1 to the latest version of 0.9.1 and solve the adaptation problem,
Com. Novoda: bintray - release: 0.9.1Copy the code
Can solve the problem perfectly, and do not need to adapt. Therefore, when quoting third-party functions, although the introduction of the overall code will be tedious, when solving the problem, we should boldly modify, have the determination to bear the consequences, and careful improvement, and refer to online solutions, we can find the most perfect solution