-
Notifications
You must be signed in to change notification settings - Fork 560
Description
Steps to Reproduce
- Install 30+ build tools in sdk manager.
2A. Specify AndroidSdkBuildToolsVersion with 30+ value in csproj.
2B. Don't specify AndroidSdkBuildToolsVersion in csproj.
- Build
Expected Behavior
Consistent behaviour for build with AndroidSdkBuildToolsVersion property and without it for the effectively same value.
Actual Behavior
For 2a) scenario there is an error on the very early stage of the build:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Legacy.targets(5,5): Error XA0032: Java SDK 11.0 or above is required when using Android SDK Build-Tools 30.0.2. (XA0032) (ApacheHttp)
from ValidateJavaVersion in Xamarin.Android.Legacy.targets
For 2b) scenario works without any errors and correctly chooses the latest build tools 30+ available
Task "ResolveAndroidTooling"
Trying build-tools path: /Users/USER/Library/Developer/Xamarin/android-sdk-macosx/build-tools/30.0.2
Using cached value for Aapt2Version: 2.19
ResolveAndroidTooling Outputs:
AndroidApiLevel: 30
AndroidApiLevelName: 30
AndroidSdkBuildToolsPath: /Users/USER/Library/Developer/Xamarin/android-sdk-macosx/build-tools/30.0.2
AndroidSdkBuildToolsBinPath: /Users/USER/Library/Developer/Xamarin/android-sdk-macosx/build-tools/30.0.2
ZipAlignPath: /Users/USER/Library/Developer/Xamarin/android-sdk-macosx/build-tools/30.0.2
AndroidSequencePointsMode: None
LintToolPath: /Users/USER/Library/Developer/Xamarin/android-sdk-macosx/tools/bin
ApkSignerJar: /Users/USER/Library/Developer/Xamarin/android-sdk-macosx/build-tools/30.0.2/lib/apksigner.jar
AndroidUseApkSigner: True
AndroidUseAapt2: True
Aapt2Version: 2.19
TargetFrameworkVersion: v11.0
Done executing task "ResolveAndroidTooling".
So the question is if Xamarin.Android.Legacy.targets checks for some legacy conditions that are not valid anymore because build tools 30+ are supported or 30+ build tools are still not supported and it works only by chance?
Looking into the latest https://github.com/xamarin/xamarin-android-tools/blob/master/src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.Versions.props#L12 it seems that 30.0.2 is the latest officially bumped version so 30+ tools are supported.
Is this note still valid https://github.com/xamarin/xamarin-android/blob/380e95e340168f68b1ae3eb43e0a71b05bc6d80b/Documentation/release-notes/4567.md ?
Version Information
=== Visual Studio Enterprise 2019 for Mac ===
Version 8.7.8 (build 4)
Installation UUID: 4a2a7fd4-4323-44d7-8285-fd367a0131d6
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)
Package version: 612000093
=== Mono Framework MDK ===
Runtime:
Mono 6.12.0.93 (2020-02/620cf538206) (64-bit)
Package version: 612000093
=== Roslyn (Language Service) ===
3.7.0-6.20427.1+18ede13943b0bfae1b44ef078b2f3923159bcd32
=== NuGet ===
Version: 5.7.0.6702
=== .NET Core SDK ===
SDK: /usr/local/share/dotnet/sdk/3.1.403/Sdks
SDK Versions:
3.1.403
3.1.402
3.1.401
3.1.302
3.1.301
3.1.300
3.1.200
3.1.102
3.1.101
3.1.100
3.1.100-preview3-014645
3.0.100
2.1.810
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Sdks
=== .NET Core Runtime ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
3.1.9
3.1.8
3.1.7
3.1.6
3.1.5
3.1.4
3.1.2
3.1.1
3.1.0
3.1.0-preview3.19553.2
3.0.0
2.1.22
2.1.21
2.1.20
2.1.19
2.1.18
2.1.16
2.1.15
2.1.14
2.1.13
=== Xamarin.Profiler ===
Version: 1.6.12.29
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Xamarin.Android ===
Version: 11.0.2.0 (Visual Studio Enterprise)
Commit: xamarin-android/d16-7/025fde9
Android SDK: /Users/USER/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
7.0 (API level 24)
8.0 (API level 26)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.4
SDK Build Tools Version: 30.0.2
Build Information:
Mono: 83105ba
Java.Interop: xamarin/java.interop/d16-7@1f3388a
ProGuard: Guardsquare/proguard@ebe9000
SQLite: xamarin/sqlite@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-7@017078f
=== Microsoft OpenJDK for Mobile ===
Java SDK: /Users/USER/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android SDK Manager ===
Version: 16.7.0.13
Hash: 8380518
Branch: remotes/origin/d16-7~2
Build date: 2020-09-16 05:12:24 UTC
=== Android Device Manager ===
Version: 16.7.0.24
Hash: bb090a3
Branch: remotes/origin/d16-7
Build date: 2020-09-16 05:12:46 UTC
=== Apple Developer Tools ===
Xcode 11.7 (16142)
Build 11E801a
=== Xamarin.Mac ===
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.
=== Xamarin.iOS ===
Version: 14.0.0.0 (Visual Studio Enterprise)
Hash: 7ec3751a1
Branch: xcode12
Build date: 2020-09-16 11:33:15-0400
=== Xamarin Designer ===
Version: 16.7.0.495
Hash: 03d50a221
Branch: remotes/origin/d16-7-vsmac
Build date: 2020-08-28 13:12:52 UTC
=== Build Information ===
Release ID: 807080004
Git revision: 9ea7bef96d65cdc3f4288014a799026ccb1993bc
Build date: 2020-09-16 17:22:54-04
Build branch: release-8.7
Xamarin extensions: 9ea7bef96d65cdc3f4288014a799026ccb1993bc
=== Operating System ===
Mac OS X 10.15.7
Darwin 19.6.0 Darwin Kernel Version 19.6.0
Mon Aug 31 22:12:52 PDT 2020
root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64