Permission denied on writing to external storage despite permission

后端 未结 6 1345
攒了一身酷
攒了一身酷 2020-12-01 15:07

I have an Android 7.0 test device and my APK targets = \"targetSdkVersion 22\", with:



        
6条回答
  •  有刺的猬
    2020-12-01 15:19

    If you target SDK 29 and you still get a "permission denied" error after successfully requesting the WRITE_EXTERNAL_STORAGE permission you should add

    android:requestLegacyExternalStorage="true"

    to the application definition in AndroidManifest.xml.

    
      
        
          ...
        
    
    

    see https://developer.android.com/training/data-storage/compatibility

提交回复
热议问题