Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Galary not opening in android Q (10) #735

Closed
Miteshmakwana73 opened this issue Jan 6, 2020 · 7 comments
Closed

Galary not opening in android Q (10) #735

Miteshmakwana73 opened this issue Jan 6, 2020 · 7 comments

Comments

@Miteshmakwana73
Copy link

Miteshmakwana73 commented Jan 6, 2020

My Application is crashing in android Q (10) it's working fine in the older version

is your library supported in android 10?

compileSdkVersion 29
targetSdkVersion 29

getting this error

Caused by java.lang.IllegalArgumentException: Invalid column COUNT(*) AS count
       at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:170)
       at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140)
       at android.content.ContentProviderProxy.query(ContentProviderNative.java:437)
       at android.content.ContentResolver.query(ContentResolver.java:962)
       at android.content.ContentResolver.query(ContentResolver.java:890)
       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)
       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:919)

Please help me what is wrong problem in the library and I am using

//image picker
    implementation 'com.zhihu.android:matisse:0.5.2-beta5'
 //glide
    implementation 'com.github.bumptech.glide:glide:4.10.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'

my code for opening galary

 Matisse.from(activity)
                    .choose(MimeType.ofImage())
                    .showSingleMediaType(true)
                    .theme(R.style.Matisse_Dracula)
                    .countable(false)
                    .addFilter(GifSizeFilter(320, 320, 5 * Filter.K * Filter.K))
                    .maxSelectable(1)
                    .originalEnable(false)
                    .maxOriginalSize(0)
                    .imageEngine(Glide4Engine())
                    .forResult(REQUEST_GALLERY)

Smartphone (please complete the following information):

  • Device: ONEPLUS A6010
  • OS: Q

Any help would be highly appreciated

@zfanplus
Copy link

zfanplus commented Jan 9, 2020

compileSdkVersion 29
targetSdkVersion 29
implementation 'com.zhihu.android:matisse:0.5.3-beta3'
implementation 'com.github.bumptech.glide:glide:4.9.0'

@JumpingError
Copy link

我也遇到这个问题,升级到:0.5.3-beta3 版本之后,不闪退了,但是没有显示任何图片。

@Miteshmakwana73
Copy link
Author

Miteshmakwana73 commented Jan 17, 2020

thank you for your response but you must have to add this line in manifest to show image after picking image from the image picker.

android:requestLegacyExternalStorage="true"

@erichyx
Copy link

erichyx commented Feb 27, 2020

我也遇到这个问题,升级到:0.5.3-beta3 版本之后,不闪退了,但是没有显示任何图片。

@JumpingError 我也遇到这个问题,有解决办法吗?

@Miteshmakwana73
Copy link
Author

Miteshmakwana73 commented Feb 27, 2020

thank you for your response but you must have to add this line in manifest to show image after picking image from the image picker.

android:requestLegacyExternalStorage="true"

@erichyx
you have to add this line in manifest

@erichyx
Copy link

erichyx commented Feb 28, 2020

@Miteshmakwana73 我项目的targetSDK是28,没有这个属性,编译会报错。
image

@Miteshmakwana73
Copy link
Author

Miteshmakwana73 commented Feb 28, 2020

@erichyx
you have to add this line in application tag and it required api level 29

<application
      android:icon="@drawable/svg_icon_logo"
      android:label="@string/app_name"
      android:roundIcon="@drawable/svg_icon_logo"
      android:requestLegacyExternalStorage="true"
      android:theme="@style/AppTheme"
      tools:ignore="GoogleAppIndexingWarning">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants