The Button class is a subclass of View. Polymorphism allows us to use subclasses in place of the parent class, however, you will only be able to access the methods from the View class, not any methods specific to the Button class.
This means you will not be able to call methods like setText()
(which the Button class inherits from TextView, which in turn inherits from View)
If you want to cast it to a button you should write:
Button buttonAdd = (Button) findViewById(R.id.add);