[Xamarin.Android.Tools.AndroidSdk] Sync with .NET 8 versions#223
Closed
[Xamarin.Android.Tools.AndroidSdk] Sync with .NET 8 versions#223
Conversation
Context: dotnet/android#8514 The scenario is as follows: 1. Install Visual Studio 17.9 Preview 2 on a clean machine. This installs Android SDK build-tools 34.0.0, cmdline-tools v11.0. 2. Create a new Xamarin.Android project. 3. Build the project. (3) prompts the user to install Android SDK build-tools 32.0.0 and cmdline-tools 7.0, because Xamarin.Android contains default values of `$(AndroidSdkBuildToolsVersion)`=32.0.0 and `$(AndroidCommandLineToolsVersion)`=7.0. This isn't a *blocker*; the user need only accept the license and install the downlevel package versions. It's just not *ideal*. Update `$(AndroidSdkBuildToolsVersion)`, `$(AndroidCommandLineToolsVersion)` and `$(AndroidSdkPlatformToolsVersion)` to be consistent with .NET 8: * `$(AndroidCommandLineToolsVersion)`/cmdline-tools to 11.0 * `$(AndroidSdkBuildToolsVersion)`/build-tools to 34.0.0 * `$(AndroidSdkPlatformToolsVersion)`/platform-tools to 34.0.5 This ensures that new classic Xamarin.Android projects won't require the installation of additional packages to install.
jonpryor
added a commit
to dotnet/android
that referenced
this pull request
Dec 11, 2023
Context: dotnet/android-tools#223 Does It Build™?
Context: dotnet/android#8580 (comment) > it doesn't build: > > ``` > MSBUILD : java error JAVA0000: Error in /Users/builder/android-toolchain/sdk/build-tools/34.0.0/mainDexClasses.rules: [/Users/builder/azdo/_work/4/s/xamarin-android/tests/Mono.Android-Tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj] > MSBUILD : java error JAVA0000: Failed to read file: /Users/builder/android-toolchain/sdk/build-tools/34.0.0/mainDexClasses.rules [/Users/builder/azdo/_work/4/s/xamarin-android/tests/Mono.Android-Tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj] > MSBUILD : java error JAVA0000: Compilation failed [/Users/builder/azdo/_work/4/s/xamarin-android/tests/Mono.Android-Tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj] > MSBUILD : java error JAVA0000: java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin [/Users/builder/azdo/_work/4/s/xamarin-android/tests/Mono.Android-Tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj] > MSBUILD : java error JAVA0000: /Users/builder/android-toolchain/sdk/build-tools/34.0.0/mainDexClasses.rules [/Users/builder/azdo/_work/4/s/xamarin-android/tests/Mono.Android-Tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj] > ```
jonpryor
added a commit
to dotnet/android
that referenced
this pull request
Dec 19, 2023
Context: dotnet/android-tools#223 Does It Build™?
jonpryor
added a commit
to dotnet/android
that referenced
this pull request
Dec 20, 2023
Context: dotnet/android-tools#223 Does It Build™?
Contributor
Author
|
I no longer think this is a good idea: dotnet/android#8580 (comment) Closing. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Context: dotnet/android#8514
The scenario is as follows:
(3) prompts the user to install Android SDK build-tools 32.0.0 and cmdline-tools 7.0, because Xamarin.Android contains default values of
$(AndroidSdkBuildToolsVersion)=32.0.0 and$(AndroidCommandLineToolsVersion)=7.0.This isn't a blocker; the user need only accept the license and install the downlevel package versions. It's just not ideal.
Update
$(AndroidSdkBuildToolsVersion),$(AndroidCommandLineToolsVersion)and$(AndroidSdkPlatformToolsVersion)to be consistent with .NET 8:$(AndroidCommandLineToolsVersion)/cmdline-tools to 11.0$(AndroidSdkBuildToolsVersion)/build-tools to 34.0.0$(AndroidSdkPlatformToolsVersion)/platform-tools to 34.0.5This ensures that new classic Xamarin.Android projects won't require the installation of additional packages to install.