Skip to content

Changing the default appicon doesn't work. #7786

@gfmoore

Description

@gfmoore

Description

Please see this issue on the documentation dotnet/docs-maui#563 that I raised.

I have an svg icon called bicycle.svg
bicycle

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:
image

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

image

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:

  1. 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

  2. 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
image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-single-projectSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizerp/1Work that is important, and has been scheduled for release in this or an upcoming sprintpartner/androidIssues for the Android SDKpartner/maciosIssues for the Mac / iOS SDKplatform/androids/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions