Android Question cannot be cast to class

yzhy-mail

Member
I use " B4XSerializator" .
I want to konw if I can use it like this : “use one list to carry several array in it”
I define a “Type MyMessage”.
“Type MyMessage” has lists in it.
I use the each list to carry some array .
like this:

Type MyMessage (TX_newlist As List, TX_changedlist As List)

When I want to get the array in the list from the receiver like this:
error:
                        For i = 0 To mm_get.TX_newlist.size-1                         

                        [U]  Dim tem() As String = mm_get.TX_newlist.Get(i)  'ERROR THERE ![/U]
                             For j = 0 To mm_get.TX_newlist.Get(i).size
                             MP.SQL1.ExecNonQuery2(MP.addEvents,tem)

                    Next



Sometime I get error like this:
java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.lang.String; ([Ljava.lang.Object; and [Ljava.lang.String; are in module java.base of loader 'bootstrap')
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…