This class has more than one @Inject-annotated constructor. Please remove the @Inject annotation from all but one of them.


Alternate names: inject-constructors, InjectMultipleAtInjectConstructors

The problem

Injection frameworks may use @Inject to determine how to construct an object in the absence of other instructions. Annotating @Inject on a constructor tells the injection framework to use that constructor. However, if multiple @Inject constructors exist, injection frameworks can’t reliably choose between them.


Suppress false positives by adding the suppression annotation @SuppressWarnings("MoreThanOneInjectableConstructor") to the enclosing element.