Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Documentation/release-notes/5234.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#### Application and library build and deployment

* [GitHub Issue 5234](https://github.com/xamarin/xamarin-android/issues/5234):
Fixed *error XA0032: Java SDK 11.0 or above is required when using
Android SDK Build-Tools 30.x.x.* that could occur when building on a
system with the Android SDK `build-tools` 30 or higher installed.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ Version GetJavaVersionForBuildTools ()
if (!Version.TryParse (buildToolsVersionString, out buildTools)) {
return Version.Parse (LatestSupportedJavaVersion);
}
if (buildTools >= new Version (30, 0, 0))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It occurs to me that instead of removing this check entirely, we should instead be "more accurate". We know Build-tools 30.0.0 and 30.0.1 require JDK 11, it's 30.0.2 (and later?) that work with JDK 8. Thus, should we check for what we know?

if (buildTools >= new Version (30, 0, 0) && buildTools < new Version (30, 0 2)) {
    return new Version (11, 0);
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we redistribute apksigner.jar now, both 30.0.0 and 30.0.1 will work.

return new Version (11, 0);
if (buildTools >= new Version (24, 0, 1))
return new Version (1, 8);
return Version.Parse (MinimumSupportedJavaVersion);
Expand Down