سلام وقتی میخوام بعضی متد ها را فراخانی کنم تیو حالت ریلیز ارور میده دلیلش چیه؟
کدم
Sub Timer_onTick(Tag As String,TimeUntil As Int)
Select Tag
Case "Show Level"
Log(1)
CanPlay = False
Log(2)
TopToPlay.Text = "Level " & CLevel
Log(3)
TopToPlay.Visible = True
Log(4)
TopToPlay.BringToFront
Log(5)
Timer.schedule("Hide Level",Timer.TimeUnit_SECONDS,1)
Log(6)
و ارور
1
2
3
game_timer_ontick (java line: 561)
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6903)
at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:1084)
at android.view.ViewGroup.invalidateChild(ViewGroup.java:5205)
at android.view.View.invalidateInternal(View.java:13670)
at android.view.View.invalidate(View.java:13634)
at android.view.View.setFlags(View.java:11475)
at android.view.View.setVisibility(View.java:8083)
at anywheresoftware.b4a.objects.ViewWrapper.setVisible(ViewWrapper.java:271)
at b4a.example.game._timer_ontick(game.java:561)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at com.persian.timer.PersianTimer.Run(PersianTimer.java:72)
at com.persian.timer.PersianTimer.access$000(PersianTimer.java:23)
at com.persian.timer.PersianTimer$1.run(PersianTimer.java:51)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
سوال
DexterFstone 395
سلام وقتی میخوام بعضی متد ها را فراخانی کنم تیو حالت ریلیز ارور میده دلیلش چیه؟
کدم
Sub Timer_onTick(Tag As String,TimeUntil As Int) Select Tag Case "Show Level" Log(1) CanPlay = False Log(2) TopToPlay.Text = "Level " & CLevel Log(3) TopToPlay.Visible = True Log(4) TopToPlay.BringToFront Log(5) Timer.schedule("Hide Level",Timer.TimeUnit_SECONDS,1) Log(6)
و ارور
1 2 3 game_timer_ontick (java line: 561) android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6903) at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:1084) at android.view.ViewGroup.invalidateChild(ViewGroup.java:5205) at android.view.View.invalidateInternal(View.java:13670) at android.view.View.invalidate(View.java:13634) at android.view.View.setFlags(View.java:11475) at android.view.View.setVisibility(View.java:8083) at anywheresoftware.b4a.objects.ViewWrapper.setVisible(ViewWrapper.java:271) at b4a.example.game._timer_ontick(game.java:561) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213) at com.persian.timer.PersianTimer.Run(PersianTimer.java:72) at com.persian.timer.PersianTimer.access$000(PersianTimer.java:23) at com.persian.timer.PersianTimer$1.run(PersianTimer.java:51) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761)
لینک ارسال
به اشتراک گذاری در سایت های دیگر
7 پاسخ به این سوال تاکنون داده شده است
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.