-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Changing the default appicon doesn't work. #7786
Copy link
Copy link
Closed as not planned
Labels
area-single-projectSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, ResizetizerSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizerp/1Work that is important, and has been scheduled for release in this or an upcoming sprintWork that is important, and has been scheduled for release in this or an upcoming sprintpartner/androidIssues for the Android SDKIssues for the Android SDKpartner/maciosIssues for the Mac / iOS SDKIssues for the Mac / iOS SDKplatform/androids/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Metadata
Metadata
Assignees
Labels
area-single-projectSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, ResizetizerSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizerp/1Work that is important, and has been scheduled for release in this or an upcoming sprintWork that is important, and has been scheduled for release in this or an upcoming sprintpartner/androidIssues for the Android SDKIssues for the Android SDKpartner/maciosIssues for the Mac / iOS SDKIssues for the Mac / iOS SDKplatform/androids/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
Please see this issue on the documentation dotnet/docs-maui#563 that I raised.
I have an svg icon called bicycle.svg

I originally followed the advice in the article https://docs.microsoft.com/en-us/dotnet/maui/user-interface/images/app-icons?tabs=android
This didn't work. The app icon remained unchanged (in the Pixel 5 emulator). I followed the advice to clean, build, rebuild, debug, dotnet clean from command line no change.
During the process of trying to get things working I got all sorts of error messages, some referring to the icon being locked. So rebooted, but sometimes still locked. dotnet clean seemed to work better than other approaches.
However, my situation is that now I have the following:

So I have my icon called bicycle.svg in the Resources/AppIcon folder, the .csproj file is referencing that file, however my app will now not build
I dragged the bicycle.icon back into the folder (on visual studio and replaced the existing one. That failed again. I had suspected that dragging the required icon into the folder would update other manifests but it seems not.
I renamed my bicycle.svg icon to appicon, removed the one in the Resource/AppIcon folder
I noted that deleting the icon from the visual studio folder also removed the App Icon
line in the .csproj
but adding the appicon.svg did not restore the line in .csproj
I had to manually restore these lines
Once I got the app working again, the app icon in the emulator still hadn't changed.
So questions:
Does the name of the appicon have to appicon.svg? I don't see why it cannot be anyname.svg as long as it matches the .csproj
In order to update the manifests in android etc (which is what I suspect is not happening), what is the correct procedure. Is there a command I can run to ensure this happens.
Here is the appicon in the emulator drawer

The one to the left is a test app with no changes to the appicon. The TSDZ2... is the one that I am trying to be the bicycle and it looks like an android icon?
I'm sorry this question is a little rambling, but I've had all sorts of issues and I couldn't figure out how best to describe what happens. The upshot seems to be that the process as described in the docs doesn't work.
Steps to Reproduce
As above
Version with bug
6.0 Release Candidate 3
Last version that worked well
Unknown/Other
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
Pixel 5 API 30
Did you find any workaround?
No
Relevant log output
No response