i guess you need
android.permission.WRITE_EXTERNAL_STORAGE
permissions in manifest if u use path File.DirRootExternal
or use other path (code fragments), see erel post with wait for
B4X:
Dim rp As RuntimePermissions
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE) 'it create a event
Log("PERMISSION_WRITE_EXTERNAL_STORAGE:" & rp.Check(rp.PERMISSION_WRITE_EXTERNAL_STORAGE))
For Each name In rp.GetAllSafeDirsExternal("")
Log(name)
Next
It is not related to B4A v8.0. It is related to targetSdkVersion value.
If it is set to 23+ then you need to use runtime permissions. See the runtime permissions tutorial. @MarkusR this code is not exactly correct.
Example of writing to File.DirRootExternal (which in most cases is a mistake to use):
B4X:
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result = False Then
ToastMessageShow("No permission...", True)
Else
File.WriteString(File.DirRootExternal, "1.txt", "aaa")
End If