TimePicker NullPointerException on ICS
问题 Alright so I just switched my TimePickerDialog to a TimePicker widget directly visible in the Activity I'm working on because of customer demand. The problem is when I press any of the arrows on said TimePicker , I get a NullPointerException. Just to clarify, no code what so ever is attached to the TimePicker except this line in the onCreate() method of my Activity: ((TimePicker) findViewById(R.id.time_picker)).setIs24HourView(true); I found this post on the Google Forums regarding this issue