Your line
Spinner spinner = (Spinner) findViewById(R.id.spinner01);
ends up the spinner
being null, since no content view has been assigned to your activity.
Thus, when trying to interact with your spinner, a NPE is thrown.
Add the setContentView(R.layout.your_layout_content);
to the onCreate method, before initializing its views.