From 6d5688c36a6dab599151102c9cb8f3b9a1622e6f Mon Sep 17 00:00:00 2001 From: Jonathan Pryor Date: Mon, 22 May 2023 17:53:38 -0400 Subject: [PATCH] [Xamarin.Android.Build.Tasks] Update XA5300 text Improve the XA5300 error messages to be more "actionable" by linking to instructions to install the Android SDK and JDK: --- Documentation/guides/messages/xa5300.md | 6 ++++++ src/Xamarin.Android.Build.Tasks/Properties/Resources.resx | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Documentation/guides/messages/xa5300.md b/Documentation/guides/messages/xa5300.md index 369df568856..4cf9925c4f8 100644 --- a/Documentation/guides/messages/xa5300.md +++ b/Documentation/guides/messages/xa5300.md @@ -15,6 +15,12 @@ be located during the build. This can be fixed on the command-line by overriding either the `$(AndroidSdkDirectory)` or `$(JavaSdkDirectory)` MSBuild properties: +```sh +dotnet build -p:AndroidSdkDirectory=path/to/android/sdk -p:JavaSdkDirectory=path/to/jdk +``` + +Instructions to manually install the Android SDK or Java SDK are at: + This can also be fixed [within Visual Studio options][vs-sdk]. Consider submitting a [bug][bug] if you are getting this failure under diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx index d84bb10ce53..cdda2379449 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx @@ -881,11 +881,13 @@ In this message, the term "handheld app" means "app for handheld devices." {3} - The Android SDK installer program name - The Android SDK directory could not be found. Check that the Android SDK Manager in Visual Studio shows a valid installation. To use a custom SDK path for a command line build, set the 'AndroidSdkDirectory' MSBuild property to the custom path. + The Android SDK directory could not be found. Install the Android SDK by following the instructions at: https://aka.ms/dotnet-android-install-sdk +To use a custom SDK path for a command line build, set the 'AndroidSdkDirectory' MSBuild property to the custom path. The following terms should not be translated: AndroidSdkDirectory - The Java SDK directory could not be found. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. + The Java SDK directory could not be found. Install the Java SDK by following the instructions at: https://aka.ms/dotnet-android-install-sdk +To use a custom JDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. The following terms should not be translated: JavaSdkDirectory