How to fix the error?

R.id.textView1.setViewsibility(View.INVISIBLE); 

Writing a mistake

Cannot invoke setViewsibility (int) on the primitive type int

How to fix?

    1 answer 1

     TextView tv = findViewById(R.id.textView1); rv.setViewsibility(View.INVISIBLE); 

    You do not confuse id with component

    • Indicates an error in findByName (int) - The method findByName (int) is undefined for the type MainActivity - kandi
    • findViewById. :-) Thought yourself guess :-) - Chad
    • Error again - Type mismatch: cannot convert from View to TextView - kandi
    • one
      Managed to fix. Working code: TextView tv = (TextView) findViewById (R.id.textView1); tv.setVisibility (View.INVISIBLE); - kandi 4:21 pm
    • Here it is right! - Chad