I have two apps, both do different things but both target sdk version 30, and request READ_EXTERNAL_STORAGE permission both in the manifest and during runtime. Both are brand new and had not been installed on the device previously.
Using a samsung phone running Android 11, I then checked the permission settings on both apps and discovered this discrepancy:
Is this possible? App #2 definitely does not ever request MANAGE_EXTERNAL_STORAGE, both of them only request the read permission which does work. But App #2 has the same permissions to the system file manager, that clearly can't be right.
Could it be that App #2 uses a library that uses MANAGE_EXTERNAL_STORAGE? You could compare the AndroidManifest of both apps after they are build. They are not always the same as the AndroidManifest that you wrote yourself for the app. Libraries can define their own required permissions and that will get merged into the final AndroidManifest
Found the issue. App #2 was built using androiddeployqt which for some reason was overriding the target sdk version I specified, so it was really an sdk level 28 app. I forced it to target the correct version and it now functions as expected.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.