Illegal argument exception in android dialog

前端 未结 4 1534
礼貌的吻别
礼貌的吻别 2021-01-18 07:34

i am using this code to show alert dialog...when i click on the ok button it should show the date picker..

protected Dialog onCreateDialog(int id) {
    swit         


        
4条回答
  •  孤城傲影
    2021-01-18 07:58

    Do you know that month field is zero based - starts from zero? Make sure that value for month does not exceed 11! I was getting exactly the same message and since I used 12 for a month, that was the reason to get this exception.

提交回复
热议问题