I have code:
public class HelloWorld extends Activity { private Button buttonOk; private Button buttonCancel; private OnClickListener buttonOkListener = ne
there is no problem with your codes, by right everything should work as per normal.
The most common mistake of encountering null via findViewById() method is when you forgot to call setContentView() or called it for the wrong layout.
findViewById()
setContentView()
I suggest cleaning your project and try again!!!!