Problem generating build in Xamarin Android (No resource found that matches the given name "at 'icon' with value '@ mipmap / icon')

1

I'm a designer trying to learn how to mount screens for Android applications through Visual Studio, using Xamarin Android, so quite a beginner in technical terms regarding the area ...

I started with the basics, following the tutorials that Xamarin gives you, but basically none of them generates the build properly, always presenting a random error. In this specific case, I want to find a solution to the problem that happens in this tutorial: link

I have already followed the step-by-step a few times and it always gives error at the time of the build. This time, the error was this: (No resource found that matches the given name "at 'icon' with value '@ mipmap / icon')

    
asked by anonymous 02.09.2016 / 15:31

1 answer

1

I found a 'gambiarra' solution that 'solves' the problem:

I went into MainActivity.cs and edited line 12 by clearing the reference on the @ mipmap / icon, leaving just this:

[Activity(Label = "DesignerWalkthrough", MainLauncher = true)]

The question is: almost every tutorial in Xamarin itself contains some small problem so it keeps me from continuing testing. In this specific case, how could I run the build without having to delete the reference "Icon=" @ mipmap / icon "?

UPDATE ------------ >

Reading a little more, I understood that the error is in the reference of the icon image. I had read in another topic that calling the resources through the 'drawable' was old fashioned and that the error could be tied to this: I should change to the 'mipmap'. However, in this specific case I followed the inverse line and switched mipmap to drawable in reference and the app ran normally. My line looks like this:

[Activity(Label = "DesignerWalkthrough", MainLauncher = true, Icon = "@drawable/Icon")]
    
02.09.2016 / 15:40