Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: OnNewIntent overrides nothing

After recent updates to several libraries in my gradle, when I built my project, it gives me these two errors:

1. 'OnNewIntent' overrides nothing
2. 'dispatchKeyEvent' overrides nothing

I see that these functions are now locked and cannot be overridden. But what are the alternate to these functions now?

like image 320
M. Usman Khan Avatar asked Apr 20 '26 18:04

M. Usman Khan


1 Answers

The parameter just became not Nullable. So just remove ? for the type KeyEvent

Change this

override fun dispatchKeyEvent(event: KeyEvent?)

to

override fun dispatchKeyEvent(event: KeyEvent)

Same goes for OnNewIntent

like image 188
M. Usman Khan Avatar answered Apr 22 '26 08:04

M. Usman Khan