Skip to content
This repository was archived by the owner on Aug 3, 2025. It is now read-only.
This repository was archived by the owner on Aug 3, 2025. It is now read-only.

Fatal Exception: java.lang.IllegalArgumentException Volume external_primary not found #64

Description

@niravtopsy

Hello,

I am getting following issue after i change my target version to 30 (older version is 29),

com.kolonishare.AlbumSelectActivity$AlbumLoaderRunnable.run (AlbumSelectActivity.java:248)
java.lang.Thread.run (Thread.java:923)

Issue in following code :

  Cursor cursor = getApplicationContext().getContentResolver()
                .query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, projection,
                        null, null, MediaStore.Images.Media.DATE_ADDED);

I tried with following code but it not help me. (by using MediaStore.VOLUME_EXTERNAL_PRIMARY)

  Cursor cursor = getApplicationContext().getContentResolver()
                .query(MediaStore.Images.Media.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY), projection,
                        null, null, MediaStore.Images.Media.DATE_ADDED);

Please can you update your code after solving this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions