Cannot resolve symbol 'WRITE_EXTERNAL_STORAGE'
时间: 2023-10-30 16:42:37 浏览: 379
dns_resolve.rar_dns
This error message usually occurs when the WRITE_EXTERNAL_STORAGE permission is not declared in the AndroidManifest.xml file or it is not imported in the Java file. To resolve this issue, follow these steps:
1. Open the AndroidManifest.xml file and add the following line of code within the <manifest> tag:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
2. If the above step does not resolve the issue, then check if the import statement for WRITE_EXTERNAL_STORAGE is added to the Java file. Add the following line of code at the beginning of the file:
import android.Manifest;
3. If the issue still persists, try cleaning the project and rebuilding it.
Once you have followed these steps, the error message should disappear and you should be able to use the WRITE_EXTERNAL_STORAGE permission without any issues.
阅读全文