Cannot resolve symbol 'MANAGE_EXTERNAL_STORAGE'
时间: 2023-10-30 10:40:20 浏览: 102
dns_resolve.rar_dns
This error typically occurs when trying to use the MANAGE_EXTERNAL_STORAGE permission in an Android app targeting API level 29 or higher. This permission was introduced in Android 11 and allows an app to manage all files on external storage, including deleting, modifying, and creating new files.
To resolve this error, you can do the following:
1. Make sure your app is targeting API level 30 or higher. The MANAGE_EXTERNAL_STORAGE permission is only available on Android 11 and higher.
2. Add the following permission to your app's AndroidManifest.xml file:
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
3. If you're using Android Studio, make sure you have the latest version installed and that your project is using the latest build tools.
4. If you're still encountering the error, try cleaning and rebuilding your project.
Note that the MANAGE_EXTERNAL_STORAGE permission is considered a sensitive permission and requires a special declaration in your app's manifest file. You'll also need to provide a justification for why your app needs this permission when submitting it to the Google Play Store.
阅读全文