一、添加静态权限
在AndroidManifest添加静态权限
```java<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" /><uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />
![在这里插入图片描述](Android开发/https://aiznh.com/wp-content/uploads/2021/06/20210606122957-60bcbfc5cc90b.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3kzMTIwNDIzMTQ=,size_16,color_FFFFFF,t_70)三、最终解决问题方法![在这里插入图片描述](Android开发/https://aiznh.com/wp-content/uploads/2021/06/20210606122957-60bcbfc5def20.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3kzMTIwNDIzMTQ=,size_16,color_FFFFFF,t_70)