gradle/gradle · error · IllegalArgumentException
Type '%s' is not managed
Error message
Type '%s' is not managed
What it means
Error "Type '%s' is not managed" thrown in gradle/gradle.
Source
Thrown at platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/typeregistration/BaseInstanceFactory.java:93
registration = new TypeRegistration<S>(publicType);
registrations.put(publicType, registration);
}
return new TypeRegistrationBuilderImpl<S>(source, registration);
}
@Override @Nullable
public <S extends PUBLIC> ImplementationInfo getImplementationInfo(ModelType<S> publicType) {
ImplementationRegistration<S> implementationRegistration = getImplementationRegistration(publicType);
if (implementationRegistration == null) {
return null;
}
return new ImplementationInfoImpl<S>(publicType, implementationRegistration, getInternalViews(publicType));
}
@Override
public <S extends PUBLIC> ImplementationInfo getManagedSubtypeImplementationInfo(final ModelType<S> publicType) {
if (!isManaged(publicType)) {
throw new IllegalArgumentException(String.format("Type '%s' is not managed", publicType));
}
final MutableReference<ImplementationInfoImpl<S>> implementationInfo = MutableReference.empty();
walkTypeHierarchy(publicType.getConcreteClass(), new RegistrationHierarchyVisitor<S>() {
@Override
protected void visitRegistration(TypeRegistration<? extends PUBLIC> registration) {
if (registration == null || registration.implementationRegistration == null) {
return;
}
ImplementationInfoImpl<S> currentImplementationInfo = implementationInfo.get();
if (currentImplementationInfo == null || currentImplementationInfo.implementationRegistration.getImplementationType().isAssignableFrom(registration.implementationRegistration.getImplementationType())) {
implementationInfo.set(new ImplementationInfoImpl<S>(publicType, registration.implementationRegistration, getInternalViews(publicType)));
}
}
});
if (implementationInfo.get() == null) {
throw new IllegalStateException(String.format("Factory registration for '%s' is invalid because it doesn't extend an interface with a default implementation", publicType));
}View on GitHub (pinned to 534f27719b)
Solutions
- The type is not a managed type. Annotate the interface with @Managed or use a type registered as managed.
When it happens
Trigger: Thrown at platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/typeregistration/BaseInstanceFactory.java:93 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gradle/gradle@534f27719b (2026-08-22).
Data as JSON: /api/errors/a002bebaf482f488.
Report an issue: GitHub.