Skip to content

XmlException when building the template Android project #5992

@wli3

Description

@wli3

Issue moved from dotnet/sdk#17946


From @tikotus on Friday, May 28, 2021 8:18:00 AM

I'm trying to create a fresh android template project but am unable to build it due to an exception. There is no obvious issue with the project. The same issue was not happening to me before on another device, but that might also have been using some other version of the Android workload.

Device:
MacBook Air (M1, 2020)

Steps:
Install .NET 6 Preview 4 (6.0.100-preview.4.21255.9)
Install Android workload: sudo dotnet workload install microsoft-android-sdk-full --skip-manifest-update
Create new project: dotnet new android
Build project: dotnet build

Exception occurs:
/usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/11.0.200-preview.4.245/tools/Xamarin.Android.Tooling.targets(64,5): error XARSD7000: System.Xml.XmlException: Root element is missing.

Thins I've tried:
Poking at different XML files in the project
Removing and re-installing dotnet
Tried both x64 and Arm64 versions of .NET

Only yesterday the template project was working for me on another device (MacBook Air 2018) but I no longer have the device and can't validate if it's somehow reproducible.

Metadata

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions