dotnet-maui-blazor-customauthentication-sample
dotnet-maui-blazor-customauthentication-sample copied to clipboard
Java errors build time
Trying to run this with latest VS2022 Preview and getting this error. Not sure if it is related to my config or SDKs or similar having changed since the sample was made but seems perhaps more like a tooling error
Severity Code Description Project File Line Suppression State Error XA5301 Failed to generate Java type for class: AndroidX.Core.View.Accessibility.AccessibilityManagerCompat/IAccessibilityStateChangeListenerImplementor due to MAX_PATH: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users******\source\repos\dotnet-maui-blazor-customauthentication-sample\src\SampleMauiApplication\obj\Debug\net6.0-android\android\src\mono\androidx\core\view\accessibility\AccessibilityManagerCompat_AccessibilityStateChangeListenerImplementor.java'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at Microsoft.Android.Build.Tasks.Files.CopyIfStreamChanged(Stream stream, String destination) in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/Files.cs:line 170 at Xamarin.Android.Tasks.GenerateJavaStubs.CreateJavaSources(IEnumerable`1 javaTypes, TypeDefinitionCache cache) SampleMauiApplication C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Common.targets 1438
Seems to be related to to long path (as the error message indicate), probably due to, in part, "dotnet-maui-blazor-customauthentication-sample". Changing that gives some other errors though.
Perhaps it's easier to just create a new project and then just add your code to that, as the error does not seem to related to your specific code but probably more changes in the tooling, SDKs, templates etc.