I'm working with Lambda in Java and added Dagger2. However I'm having problem injecting objects to my lambda handler.
I'm getting the following error: enter image description here
Class handler.GameSessionLambda has no public zero-argument constructor: java.lang.Exception java.lang.Exception: Class handler.GameSessionLambda has no public zero-argument constructor Caused by: java.lang.NoSuchMethodException: handler.GameSessionLambda.\<init\>() at java.base/java.lang.Class.getConstructor0(Unknown Source) at java.base/java.lang.Class.getConstructor(Unknown Source)
InjectedConstants: enter image description here Module Class: enter image description here Component interface: enter image description here The Handler: enter image description here
Its working without dagger2, but since I want my handler to hold more logic and services I wanted to add dependency injection to follow best practices and save little runtime.By the way if I included an empty constructor then the lambda ignores the other constructor which results in null for the injected objects.