Open hansmbakker opened 3 months ago
The behavior you describe is By Design: When building apps in Debug configuration, Fast Deployment is used to "side load" assemblies into the application's files/.__override__
directory, avoiding the need to update, re-sign, and re-deploy the .apk
whenever an assembly is changed.
Unfortunately, when you "(4) clear storage and clear cache" of the application, the files/.__override__
directory is also removed, meaning there are no assemblies:
[monodroid] No assemblies found in '/data/user/0/com.anonymizeddomain.mobiledevelopment.showcase/files/.__override__' or '<unavailable>'. Assuming this is part of Fast Deployment. Exiting...
If there are no assemblies, there is nothing to run.
If you truly need your app to be able to run after you "clear storage and clear cache", then you'll need to either build and run a Release configuration of your app, or set $(EmbedAssembliesIntoApk)
to True. Please not that this will significantly impact your "inner dev loop", as deploy and launch times will increase.
This is indeed expected behavior, but I think we can do a bit better by checking whether the assemblies exist at deploy/run/debug time and re-deploy them if necessary. @dellis1972 what do you think?
Hmm, the issue here is that the target _Upload
is skipped because the assemblies have not changed and the apk didn't change. We might need to expand the "has the app be uninstalled" check to see if the cache is missing then force an upload.
@dellis1972 yeah, I think we probably need that check, even though it may slow things a bit :(
Android application type
.NET Android (net7.0-android, net8.0-android, etc.)
Affected platform version
VS 2022 17.11 Preview 1, .NET 8.0.300, MAUI 8.0.40
Description
This issue is split off from https://github.com/xamarin/xamarin-android/issues/8906 to discuss just the
SIGABRT
error that @grendello saw in the logs.I found one way to reproduce the
SIGABRT
error, but please note that I do not know whether it is the only causeClearing user data and cache seems to delete binaries that the app needs to run when debugging from Visual Studio.
Note: If this is intended behavior, I would expect more guidance to developers that you're not supposed to clean user data / cache between debug runs.
Steps to Reproduce
app info
page of the app (in android, e.g. via long-press on the app icon)Did you find any workaround?
No response
Relevant log output