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

net8.0-android34.0 - Deployment failed on Android device with error XABLD7023: Could not find a part of the path (Microsoft.Maui.Controls.resources.dll) #23796

Closed
tobinfodata opened this issue Jul 24, 2024 · 3 comments
Labels
platform/android 🤖 potential-regression This issue described a possible regression on a currently supported version., verification pending s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed t/bug Something isn't working

Comments

@tobinfodata
Copy link

Description

Following the new Google Play requirements, I need to compile my application to target Android API level 34.
To do this, I upgraded the .NET version of my application from .NET 7 to .NET 8.
Since then, I have been unable to deploy the application on my smartphone for testing before publishing on Google Play.

Here's the error Visual Studio returns when I try to compile and deploy my application :

XABLD7023: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\tom\.nuget\packages\microsoft.maui.controls.core\8.0.70\lib\net8.0-android34.0\ar\shrunk\Microsoft.Maui.Controls.resources.dll'.
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)
at Xamarin.Android.Tasks.MonoAndroidHelper.IsReferenceAssembly(String assembly)
at Xamarin.Android.Tasks.BuildApk.<AddAssemblies>g__AddAssembliesFromCollection|160_0(ITaskItem[] assemblies, <>c__DisplayClass160_0& )
at Xamarin.Android.Tasks.BuildApk.AddAssemblies(ZipArchiveEx apk, Boolean debug, Boolean compress, IDictionary2 compressedAssembliesInfo, String assemblyStoreApkName)
at Xamarin.Android.Tasks.BuildApk.ExecuteWithAbi(String[] supportedAbis, String apkInputPath, String apkOutputPath, Boolean debug, Boolean compress, IDictionary2 compressedAssembliesInfo, String assemblyStoreApkName)
at Xamarin.Android.Tasks.BuildApk.RunTask()
at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 25

After attempting to access the missing file, I notice that the 'shrunk' folder does not exist.

I have already deleted the bin and obj directories multiple times, and I have even recreated a project from scratch.

dotnet workload list

android                                   34.0.113/8.0.100          SDK 8.0.300, VS 17.10.35027.167
aspire                                    8.1.0/8.0.100             SDK 8.0.300, VS 17.10.35027.167
ios                                       17.2.8078/8.0.100         SDK 8.0.300, VS 17.10.35027.167
maccatalyst                               17.2.8078/8.0.100         SDK 8.0.300, VS 17.10.35027.167
maui                                      8.0.61/8.0.100            SDK 8.0.300
maui-mobile                               8.0.61/8.0.100            SDK 8.0.300
maui-windows                              8.0.61/8.0.100            SDK 8.0.300, VS 17.10.35027.167

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.70 SR7

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

7.0.49

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@tobinfodata tobinfodata added the t/bug Something isn't working label Jul 24, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@samhouts samhouts added platform/android 🤖 potential-regression This issue described a possible regression on a currently supported version., verification pending labels Jul 24, 2024
@RoiChen001 RoiChen001 added the s/triaged Issue has been reviewed label Jul 31, 2024
@RoiChen001
Copy link

@tobinfodata Could you provide a sample project for us to investigate it further? Looking forward to your reply!

@jfversluis jfversluis added the s/needs-repro Attach a solution or code which reproduces the issue label Jul 31, 2024
@dotnet-policy-service dotnet-policy-service bot added the s/no-recent-activity Issue has had no recent activity label Aug 5, 2024
@tobinfodata
Copy link
Author

Hello,

I tried again without any changes (or involuntarily...) and it works now... Sorry, I don’t know why.
Thank you for your attention.

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue s/no-recent-activity Issue has had no recent activity labels Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/android 🤖 potential-regression This issue described a possible regression on a currently supported version., verification pending s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants