.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
1.92k
stars
526
forks
source link
[Xamarin.Android.Build.Tasks] fix `<GenerateRtxt/>` during design-time builds #9288
Closed
jonathanpeppers closed 1 week ago
Fixes: https://github.com/dotnet/android/issues/9285
Building a .NET 9 project without API 35 installed would fail with:
I was able to reproduce this in an MSBuild test that uses:
To fix this:
Remove
[Required]
from theJavaPlatformJarPath
propertyAdd some extra checks if the value is
null
or emptyI also did some other cleanup:
MonoAndroidHelper
now logs during the<GetJavaPlatformJar/>
task, even during a design-time build.Removed what looked like an unused, extra line in
FileResourceParser
:string publicXmlPath = Path.Combine (JavaPlatformDirectory, "data", "res", "values");