javaandroidjava-8retrolambda

Error:incompatible types: DeviceCheckCallback is not a functional interface


I have an interface that was once functional. Now I'd like it to have more abstract methods so I added them to the interface and changed all implementations to override those methods. I use retrolambda in my project. When I run the app I get the following error:

Error:incompatible types: DeviceCheckCallback is not a functional interface multiple non-overriding abstract methods found in interface DeviceCheckCallback

Why am I seeing this? I don't want this interface to be functional anymore?


Solution

  • The interface you are trying to provide a Lambda for has more than one method. Lambda's can only be used for interfaces that have a single method (which they call a "Functional Interface")