In a library I wrote I create a List of Map objects and pass it to an event
The List itself is initialized as well as all Maps in this list.
In the B4A event I have something like:
B4X:
Sub pop_DownloadAllMessagesCompleted (Success As Boolean, Size As Int, Count As Int, Messages As List, headers As List)
For lcv = 0 To Count -1
Dim hdr As Map
hdr = headers.Get(lcv)
ListView1.AddSingleLine(hdr.Get("SUBJECT"))
Next
End Sub
So I cast each item in the headers list as a Map.
In runtime on this line I get a class cast exception.
As a note: when I create a List of Maps in B4A all is OK.
In your library code are you creating and returning a anywheresoftware.b4a.objects.collections.List of anywheresoftware.b4a.objects.collections.Map or a java.util.List of java.util.Map?
I've found that returning a native Java object to B4A sometimes works but B4A may choke on some native Java objects so you should create and return the B4A objects instead.