Android RuntimeException onCreateDialog did not create a dialog for id

前端 未结 5 952
温柔的废话
温柔的废话 2021-02-09 19:33

I\'ve an application that you can show and close several Dialogs with:

showDialog(...)
removeDialog(...)

I play a little bit with the applicati

5条回答
  •  日久生厌
    2021-02-09 20:10

    In API level 8, onCreateDialog(int) was deprecated in favor of onCreateDialog(int,Bundle). If you implement only the latter method and run the app on a device with an API level lower than 8, you get the described error message.

    The solution is to implement onCreateDialog(int)

提交回复
热议问题