Overriding method should call super.onResume

I have recently updated my Android Studio to 3.0 Canary 6.
In fragment when I override onResume method, IDE started showing error in it with message Overriding method should call super.onResume though I have added super method call to it as shown below.

override fun onResume() {
     super.onResume()
}

I have observed similar behaviour for onDestroyView method as well. For onCreateView it is working fine.

Also though it is showing error (and not warning), application is running as expected.

Can anybody tell what is going wrong here?

1 Like

Just want to add that I’m having the same problem. I moved a few common base classes to a separate library module and now all my sub classes with overriding methods from those annotated with @CallSuper (from the library module I created) have error lines underneath them. The error message is for not calling super of the parent class method even though nothing has changed and they are still calling the super. Project compiles and runs fine, but it is annoying to see.

Here you can see I’m calling super

Here is the error message saying I’m not calling super

This looks like a Lint issue. You should probably report it to Google’s tools team.

After stable release of Android Studio (v3.0.1), IDE has stopped showing above mentioned error. Instead now IDE shows warning saying Redundant override (This inspection reports redundant ‘override’ function which can be omitted.)

It seems this issue has been taken care by Google team.

I’m still seeing the error with v3.0.1

I am getting this message in AS v3.0.1. I wonder why you are still getting above error.
As @pdvrieze suggested this might be lint issue.

yes, i’m also facing the same issue w/ v3.0.1

Problem still exists in 3.0.1
33%20PM