dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.21k stars 1.75k forks source link

Android SDK License (ndk-bundle) FAIL #10920

Closed tactical-drone closed 2 years ago

tactical-drone commented 2 years ago

Description

The latest 17.4 does this when you try to work on maui stuff. (lastnight's RC2 bits)

image

Pressing accept leads to:

--- Items to install
NDK : ndk-bundle
Applying Android SDK Changes Started
Installing Android SDK Components Started
Installing NDK v22.1.7171670 Started
Downloading NDK v22.1.7171670 failed
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
   at Xamarin.Installer.AndroidSDK.MonitorWithTotalProgress.set_SubComponentsCount(Int32 value)
   at Xamarin.Installer.AndroidSDK.Manager.AndroidSDKComponent.<Install>d__66.MoveNext()
Android SDK components installation failed

Installing it manually from the Manager yields:

image

In general, the MAUI workloads are causing all kinds of bugs. There are so many and it's so vast I doubt it needs explanations here. I hope that the release will sort these out.

Steps to Reproduce

Download VS2022 Preview and try to use MAUI.

The out of the box experience will not work, guaranteed.

Link to public reproduction project repository

https://dev.azure.com/unimatrix-zero

Version with bug

7.0 Release Candidate 2

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

microsoft.net.sdk.ios.manifest-7.0.100.msi.x64 (16.0.1475)

Did you find any workaround?

No, even after pulling every conceivable lever.

reinstall vs2022 preview 17.4 reinstall vs2022 delete c:\program files\dotnet <- good luck fixing such a stupid move. dotnet installers totally brick when you do this dotnet workload restore dotnet workload update dotnet workload install maui maui-check

 dotnet workload install maui 
>>   --skip-sign-check 
>>   --from-rollback-file https://aka.ms/dotnet/maui/net6.0.json 
>>   --source https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-531f715f/nuget/v3/index.json 
>>   --source https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-3f6c45a2/nuget/v3/index.json 
>>   --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json 
>>   --source https://api.nuget.org/v3/index.json

Nothing works. There is always some bullshit error that ends in

Workload installation failed: One or more errors occurred. (microsoft.maccatalyst.sdk.msi.x64::15.4.470 is not found in NuGet feeds https://api.nuget.org/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json;C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json;https://pkgs.dev.azure.com/azure-public/vside/_packaging/xamarin-impl/nuget/v3/index.json;c:\program files\dotnet\packs;https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json".)

What boggles the mind is that these are just files. Somehow the files that Microsoft has works, but the ones we have don't work. Or they won't have made the release. How hard can it be to deliver files to a computer. Just boggles the mind.

Relevant log output

-> `delete c:\program files\dotnet [SUCCESS]`
-> `install assembler maui bits [FAIL]`
-> `aquire lawnmower [SUCCESS}`
-> `mow lawn instead [SUCCESS]`
-> `profit [TRUE]`
borrmann commented 1 year ago

I am currently facing the same problem. I reinstalled visual studio entirely, deleted android studio but after a full fresh setup I currently face the same error again! How did you solve this problem or why is this marked as closed? @tactical-drone

edit: downloading the latest NDK that has a download size worked for me. It seems like the download links are broken.. If newer NDK is needed maybe downloading directly from android could work, but not sure if VS detects this automatically or in which folder they belong. Working with an older NDK seems to work fine in my case.

ghost commented 1 year ago

Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you!

tactical-drone commented 1 year ago

Lovely human. Lol.

I closed it because I made the post in anger. I should learn not to do that.