runOnUiThread(new Runnable(){}) is undefined for the type new Thread(){}

前端 未结 3 1647
时光取名叫无心
时光取名叫无心 2021-01-01 18:31

Looking at the part:

runOnUiThread(new Runnable() {

I have the problem:

The method runOnUiThread(new Runnable(){}) is undef         


        
3条回答
  •  Happy的楠姐
    2021-01-01 19:24

    If you are using Fragments just add getActivity()

    Here replace :
    runOnUiThread(new Runnable() {
    By
    getActivity().runOnUiThread(new Runnable() {

提交回复
热议问题