You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
XmlException when building the template Android project #5992
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.
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.
Yes, that was the error.
Anyways, I'm no longer able to reproduce the issue. Building the template android project now works for me. This is most likely because I've since installed JDK (didn't realise I was missing it), since missing java was the problem in the other issue you posted. I can't verify if installing JDK is what fixed it, since I didn't try building right after installing JDK.
Activity
wli3 commentedon Jun 3, 2021
Issue moved from dotnet/sdk#17946
From @dotnet-issue-labeler[bot] on Friday, May 28, 2021 8:18:03 AM
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
jonathanpeppers commentedon Jun 4, 2021
@tikotus is this the error you're seeing?
dotnet/android-tools#120
What is the output of this command in your terminal?
tikotus commentedon Jun 4, 2021
Yes, that was the error.
Anyways, I'm no longer able to reproduce the issue. Building the template android project now works for me. This is most likely because I've since installed JDK (didn't realise I was missing it), since missing java was the problem in the other issue you posted. I can't verify if installing JDK is what fixed it, since I didn't try building right after installing JDK.
jonathanpeppers commentedon Jun 4, 2021
Ok, hopefully we'll get the above fix and next time you'll get an error message that says "there is no JDK installed" instead of the
XmlException.[JdkInfo] handle invalid XML from /usr/libexec/java_home (#120)
Bump to xamarin/xamarin-android-tools/main@90d76212
Bump to xamarin/xamarin-android-tools/main@90d76212
jonathanpeppers commentedon Jun 14, 2021
This was fixed in ceca993.
It bumped to a version of xamarin-android-tools that has this fix. It should be in .NET 6 Preview 6.