Closed Letalus closed 4 years ago
The interesting part from the release note :
External storage access scoped to app files and media
By default, apps targeting Android 10 and higher are given scoped access into external storage, or scoped storage. Such apps can see the following types of files within an external storage device without needing to request any storage-related user permissions:
Files in the app-specific directory, accessed using getExternalFilesDir(). Photos, videos, and audio clips that the app created from the media store. To learn more about scoped storage, as well as how to share, access, and modify files that are saved on external storage devices, see the guides on how to manage files in external storage and access and modify media files.
But from my understanding, it should still work the same way if you request permissions...
Some articles that may help tackle the issue :
Hey aloisdeniel, thanks for your quick reply. I believe you are right, that the permission are not the reason for the crash. I call this setGalleryImageList() methode in the initState of the screen widget. Somehow this code code throws the error above. Can you maybe see what Im doing wrong there or what's going wrong there? Maybe it fails because it is called within the initState but that would be a really super weird bug.
okay I finally found the reason why I get the above error: Its due to my app/build.gradle file. Within the app/build.gradle of the example project the variables "complieSdkVersion" and "targetSdkVersion" is set to 28. After you have upgraded those gradles to 29 you will get this exact error. To use the current plugin, I had to downgrade those variables from 29 to 28.
As an improvement for the package, I suggest to update the project complieSdkVersion (within the android.build.gradle) to 29, so this error will disappear.
Thanks for the resolution details!
I'll see if I can upgrade the compileSdkVersion
to 29
.
Hey whenever I try to get the Medias from my phones the app crashes with following stack trace:
Apparently the error happens due to this error :
Invalid column count(*) AS count
.IMPORTANT
It seems after some testing that this error only appears with versions Android APi 29 and plus. The crashes happen probably due to one of this Android changes
Does someone know how to fix this?