handler方法下setText标红,怎么解决

img

 private Handler handler=new HandlerO
    @Override
   public void handleMessage(@NonNull Message msg)t
 int currentPosition = msg.what
        positionBar.setProgress(currentPosition)
String timel = createTimeLabel(currentPosition)
        timel.setText(timel)
 String gtime2=createTimeLabel(totalTime-currentPosition);
         time2.setText(”-”+time2)

string 哪里有settext的方法。。。

你的time1和time2都是String setText()方法 只有想TextView EditText Button等等这些View才有