List.RemoveAt error

agraham

Expert
Licensed User
Longtime User
B4X:
E/B4A     (12813*12813): java.lang.UnsupportedOperationException
E/B4A     (12813*12813):    at java.util.AbstractList.remove(AbstractList.java:645)
E/B4A     (12813*12813):    at anywheresoftware.b4a.objects.collections.List.RemoveAt(List.java:93)
B4X:
   Dim files As List
   files = File.ListFiles(IdePath)
   files.Sort(True)
   For i = files.Size - 1 To 0 step -1
      If File.IsDirectory(IdePath, files.Get(i)) Then
         Log(files.Get(i))
         files.RemoveAt(i)
      End If
   Next
 
Top