Skip to content

Commit 0acad9a

Browse files
bcorsoDagger Team
authored andcommitted
Update missing InjectedFieldSignature error with actionable message.
See #2266 RELNOTES=N/A PiperOrigin-RevId: 352595915
1 parent 1822650 commit 0acad9a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

java/dagger/internal/codegen/binding/InjectionAnnotations.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,12 @@ private ImmutableCollection<? extends AnnotationMirror> getQualifiersForKotlinPr
141141
.orElseThrow(
142142
() ->
143143
new IllegalStateException(
144-
"No matching InjectedFieldSignature for " + memberInjectedFieldSignature));
144+
String.format(
145+
"No matching InjectedFieldSignature for %1$s. This likely means that "
146+
+ "%1$s was compiled with an older, incompatible version of "
147+
+ "Dagger. Please update all Dagger dependencies to the same "
148+
+ "version.",
149+
memberInjectedFieldSignature)));
145150
} else {
146151
throw new IllegalStateException(
147152
"No MembersInjector found for " + fieldElement.getEnclosingElement());

0 commit comments

Comments
 (0)