سؤال

I've added a custom runtime annotation for fields in my project. Dagger now prints a warning for these annotated fields with each compile. Can I suppress this warning?

Dagger will ignore qualifier annotations on fields that are not annotated with @Inject: my.package.MyClass.mField

Here is a code example:

@Inject
User mUser;

@Retain
private boolean mVariable; // Dagger complains about this variable

How can I suppress this warning?

هل كانت مفيدة؟

المحلول

What does @Retain look like? If it is itself annotated with @QualifierAnnotation, remove that.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top