Can't resolve symbol 'setText' error

后端 未结 4 1653
情书的邮戳
情书的邮戳 2021-01-17 06:53

like the title says I\'m getting an error when trying to set a text view text from java in my android project, I can\'t see why.

    package com.codeherenow.         


        
4条回答
  •  南笙
    南笙 (楼主)
    2021-01-17 07:25

    public TextView YT = (TextView) findViewById(R.id.Years);
    

    statement must write onCreate() method.

提交回复
热议问题