gmaster gmaster - 1 year ago 124
Android Question

Xamarin Visual Studio not recognizing images

I'm using Xamarin to develop an Android app in C# using Visual Studio 2012. It's been going fairly well so far but I'm having a problem with designing the interface. I put some images in Resources/drawable for the project, but I can't get the solution explorer in VS to pick up that these images are there. It only shows the default Icon.png file that is included in every new project. I was briefly able to get it to detect one other image by cleaning and rebuilding the solution, but that hasn't worked since, and even in that case I couldn't get it to actually display in an ImageView. I'm unable to point my ImageView to any of my images since VS isn't creating a reference for them to use (e.g. @drawable/myimage). Refreshing the solution explorer does nothing. Anyone have any other ideas on what I could try?

Answer Source

Right clicking the folder in solution explorer, selecting add > existing file, selecting the file, and then rebuilding the project solved the issue.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download