Repository navigation
[pull] main from xamarin:main - #575
Merged
Merged
Conversation
…T 8 (#8375) Fixes: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1837913 Context: dc3ccf2 Testing on a DevBox with only the .NET 8 RC 1 SDK and `dotnet workload install maui`: > dotnet new android > dotnet build -t:InstallAndroidDependencies -p:AndroidSdkDirectory=C:\tools\android-sdk -p:JavaSdkDirectory=C:\tools\jdk -bl Microsoft.Android.Sdk.Windows\34.0.0-rc.1.432\tools\Xamarin.Android.Common.Debugging.targets(110,2): error XA5300: 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. Ok, that's completely broken... So let's add `-c Release`, as this target is related to Fast Deployment: Microsoft.Android.Sdk.Windows\34.0.0-rc.1.432\tools\Xamarin.Android.Common.targets(664,2): error : Could not locate Java 6 or 7 SDK. I tested .NET 7 and it worked fine?!? It turns out to be due to an additional `_ResolveMonoAndroidSdks` target running in .NET 8 that *doesn't* run in .NET 7: https://github.com/xamarin/xamarin-android/blob/547a157a7aeae930e4fc6092636fa20771ff1ef6/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.BuildOrder.targets#L181 This was introduced in dc3ccf2, but I don't think it was needed. The `GetAndroidDependencies` target doesn't run during a normal build, so it doesn't seem like `$(GetAndroidDependenciesDependsOn)` should need to run anything extra either. Update `$(GetAndroidDependenciesDependsOn)` so that the `_ResolveMonoAndroidSdks` target is no longer executed. With this change in place, `InstallAndroidDependencies` works on my DevBox, and I'm also able to build apps in `Debug` and `Release` mode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )