Hello folks, i'm using Threading Library 1.10 version with Android SDK 4.
The code is inside an Activity it's executed at startup, when the app starts:
In debugging the log tell:
At this line: count1 = 0
android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
This is pretty strange; it seems i couldn't do any assignment inside the method executed in this other thread and i can't refer any member variable inside it.
The routine fails also in release mode.
What do you think ?
The code is inside an Activity it's executed at startup, when the app starts:
B4X:
Dim thr As Thread
Dim MyMap As Map
MyMap.Initialize()
thr.Initialise("THR")
thr.Start(Null, "SetInitialLanguage", Array As Object(MyMap))
Sub SetInitialLanguage(mapobj As Object)
Dim count1 As Int
count1 = 0
Do While (count1 <= 10)
count1 = count1 + 1
Loop
End Sub
In debugging the log tell:
At this line: count1 = 0
android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
This is pretty strange; it seems i couldn't do any assignment inside the method executed in this other thread and i can't refer any member variable inside it.
The routine fails also in release mode.
What do you think ?
Last edited: