Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java errors build time #3

Open
improwise opened this issue Sep 5, 2022 · 1 comment
Open

Java errors build time #3

improwise opened this issue Sep 5, 2022 · 1 comment

Comments

@improwise
Copy link

improwise commented Sep 5, 2022

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

@improwise
Copy link
Author

improwise commented Sep 5, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant