Search code examples
androidxamarin.androidrider

How to set up drawable resource folders for Xamarin Android app in Rider IDE


I'm brand new both to Xamarin and the Rider IDE, but not to Android. I'm going through some test projects, but when I make a new project, the ProjectName/Resources folder is missing things that I would expect to be there, most notably drawable. How can I create or get access to those directories so that I can do something like set the app icon?

I've tried creating a drawable directory, including it, and making sure that the build action is set to AndroidResource, but when I add Icon = @drawable/icon.png in the MainActivity, it doesn't recognize the drawable tag.


Solution

  • I found a solution for this. As I mentioned, I created the drawable folder manually, added the icon to it and made sure to right click and Include it. Then, in the manifest, I added android:icon="@drawable/icon and that got the icon to show up properly. So it didn't fix the issue of the folders not being generated, but at least for a simple task like updating the icon, it worked.