Very frustrating problem I have here. I have this code:
Button b = findViewById(android.R.id.button1);
And I\'m getting this error on it:
You need to cast the view to Button:
Button b = (Button) findViewById(android.R.id.button1);
More details at http://docs.oracle.com/javase/tutorial/java/IandI/subclasses.html
In addition, as answered by others, the id is wrong.