Cannot find symbol: method findViewByID(int) [closed]

Tags: ,

Been trying to figure out the problem for the last two hours. The solutions I have seen and tried are as follows:

  • Invalidate caches/restart

  • getView().findViewByID( or rootView.findViewById(

  • Casing

          Button popUp = (Button) findViewByID(;        

This is the video that I was following to create this.

Any help would be greatly appreciated, thank you.



Button popUp = (Button) findViewByID(;

with this

Button popUp = (Button) findViewById(; 

You are writing findViewByID it’s not allowed in android write findViewById

Source: stackoverflow