.NET for Android error XA4244

Example message

error XA4244: Attribute 'JavaVersion' cannot be empty for 'ProjectReference' item '../ReferenceProject.csproj'.

Issue

The referenced MSBuild item XML specifies a required attribute but omits a required value.

For example, the JavaArtifact attribute on a <ProjectReference> cannot have an empty value.

Invalid:

<ItemGroup>
  <ProjectReference Include="../ReferenceProject.csproj" JavaArtifact="" JavaVersion="1.0.0" />
</ItemGroup>

Solution

To resolve this error, specify a value for the required XML attribute:

<ItemGroup>
  <ProjectReference Include="../ReferenceProject.csproj" JavaArtifact="com.example:mylib" JavaVersion="1.0.0" />
</ItemGroup>