Android.Content.Res.Resources+NotFoundException

Azazel2098 21 Reputation points
2022-04-07T08:06:44.843+00:00

I have been trying to create a custom renderer for a button in xamarin forms. I want to set its background with the layout I have made in xml for android.
Everything works fine and and there are no build errors as well.
But Xamarin throws Android.Content.Res.Resources+NotFoundException

190815-capture2.png

The Resource.Designer.cs file contains the id : -
// aapt resource value: 0x7F07006D
public const int googlesback = 2131165293;

The xml file is also placed in drawable folder

Developer technologies .NET Xamarin
{count} votes

1 answer

Sort by: Most helpful
  1. Azazel2098 21 Reputation points
    2022-04-09T08:35:23.877+00:00

    My layout was set to AndroidResource and still the issue persisted. Removing the bin/obj and cleaning the solution and building again worked.
    Thank you so much!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.