gradle/gradle · error · InvalidUserDataException
You can't map a property that does not exist: propertyName={
Error message
You can't map a property that does not exist: propertyName={propertyName} What it means
Gradle throws this error when the following condition is violated: You can't map a property that does not exist: propertyName=<propertyName>
Source
Thrown at platforms/core-configuration/model-core/src/main/java/org/gradle/internal/extensibility/ConventionAwareHelper.java:67
public class ConventionAwareHelper implements ConventionMapping {
//prefix internal fields with _ so that they don't get into the way of propertyMissing()
private final IConventionAware _source;
// These are properties that could have convention mapping applied to them
private final Set<String> _propertyNames;
// These are properties that should not be allowed to use convention mapping
private final Set<String> _ineligiblePropertyNames;
private final Map<String, MappedPropertyImpl> _mappings = new HashMap<>();
public ConventionAwareHelper(IConventionAware source) {
this._source = source;
this._propertyNames = JavaPropertyReflectionUtil.propertyNames(source);
this._ineligiblePropertyNames = new HashSet<>();
}
private MappedProperty map(String propertyName, MappedPropertyImpl mapping) {
if (!_propertyNames.contains(propertyName)) {
throw new InvalidUserDataException(
"You can't map a property that does not exist: propertyName=" + propertyName);
}
Class<? extends IConventionAware> sourceType = _source.getClass();
// Route ConventionMapping("oldName") to the renamed lazy property's `.convention()` API
// (e.g. CreateStartScripts: getOutputDir File -> getOutputDirectory DirectoryProperty).
// The eager getter is kept as a backward-compat bridge but external plugins still register conventions with the old name.
String renamedProperty = ProviderApiMigrationConventionHelper.findRenamedProperty(sourceType, propertyName);
if (renamedProperty != null) {
propertyName = renamedProperty;
}
if (_ineligiblePropertyNames.contains(propertyName)) {
Method getter = JavaPropertyReflectionUtil.findGetterMethod(sourceType, propertyName);
// When there's a convention-supporting object, use its `.convention()` method instead
// This is something we added to support properties migrated in the future from
// Java bean to Property where old code uses ConventionMapping to set conventions.View on GitHub (pinned to 534f27719b)
Solutions
- Verify the path is correct and that the file or directory actually exists before referencing it.
- Create the missing file/directory or update the build script to point at an existing location.
When it happens
Trigger: Thrown at platforms/core-configuration/model-core/src/main/java/org/gradle/internal/extensibility/ConventionAwareHelper.java:67 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/94d6478da6bf36e2.
Report an issue: GitHub.