When moving targetSdkVersion from 19 to 26, the following code stopped working:
Sub ListFiles
Dim list_files As List
list_files.Initialize
File.MakeDir(File.DirRootExternal, "Text/")
dir=File.Combine(File.DirRootExternal,"Text/")
list_files=File.ListFiles(dir)
For i= list_files.Size -1 To 0 Step -1 ' error "(List) Not initialized"
If i = list_files.Size-Selected-1 Then
Filename = "ECG_Reader/" & list_files.Get(list_files.Size-Selected-1)
ListView1.AddTwoLines(list_files.Get(list_files.Size-Selected-1),"")
End if
End Sub
How to fix?
Sub ListFiles
Dim list_files As List
list_files.Initialize
File.MakeDir(File.DirRootExternal, "Text/")
dir=File.Combine(File.DirRootExternal,"Text/")
list_files=File.ListFiles(dir)
For i= list_files.Size -1 To 0 Step -1 ' error "(List) Not initialized"
If i = list_files.Size-Selected-1 Then
Filename = "ECG_Reader/" & list_files.Get(list_files.Size-Selected-1)
ListView1.AddTwoLines(list_files.Get(list_files.Size-Selected-1),"")
End if
End Sub
How to fix?
Last edited: