Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, September 27, 2017 10:02 AM
Hey guys.
Im new to Visual Studio 2017 with Xamarin and created a App with a Webview in it. My script works when I test it on my device but I just cant add in Icon to it!
I read a lot about it and spend hours trying! I figured out i had to add the Icon to the assemblyInfo like this [assembly: Application(Icon = "@drawable/icon")]
After adding this I always get an Error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/icon'). Test ...\obj\Debug\android\manifest\AndroidManifest.xml 8
But i put an Image in my drawable folder (icon.png) ! I also cant see the icon on the sidebar in my Project folder in Visual Studio..
Somehow i figured out that I can add the icon.png file to obj/Debug/res/drawable after I created the fodler drawable there and it will show the Icon on my Android BUT then my App doesnt work anymore -> Blackscreen and the App crashes.
Why is it so hard to add a god damn Icon? I also cant select any Icon in my Properties Tab. The DropDown "Apllication Icon" is always empty no matter how I try to add my Icon.
Im really desperate, Please help me!
kind regards Marvin
All replies (6)
Wednesday, September 27, 2017 3:50 PM âś…Answered
I found a solution! All I had to do was to drag and drop the icon.png directly into drawable in my Visual Studio. So it recognized it!
Wednesday, September 27, 2017 1:31 PM
@xDrago said: refer this https://stackoverflow.com/questions/37945767/how-to-change-application-icon-in-xamarin-forms
Wednesday, September 27, 2017 1:35 PM
@xDrago said: refer this it may help you i belive http://www.c-sharpcorner.com/article/configure-app-icons-in-xamarin-forms-app/
Wednesday, September 27, 2017 2:21 PM
Hey thanks but your links are for iOS not Android
Saturday, October 13, 2018 7:57 PM
Ah. Maybe another solution would be to add the file this way:
put the file in the drawable directory using the file system/File Explorer
in VS, r-click the drawable directory
Add > Existing Item
select the file
Saturday, August 24, 2019 6:10 PM
In visual studio 2019 xamarin android phone blank project, there is NO drawable directory under Resource directory. Further, any attempts to add a drawable directory is met with warnings that one already exists! What gives with that?