Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Material Controls Show Error

Hello when i add Material Controls From ToolBox Like Material Button or Material CardView the Control text is (Show Error) in red color how to slove this issue thanks :)

Best Answer


  • stewa11stewa11 Member ✭✭

    Hi Cptn,
    might be an idea to show your code. It's often a syntax error.

  • CaptainPriceCaptainPrice Member ✭✭

    bro the problem not in c# code
    the problem showing in Layout in Material Control

  • jezhjezh Member, Xamarin Team Xamurai
    edited October 22

    bro the problem not in c# code
    the problem showing in Layout in Material Control

    Could you please post the error log or some screenshots of your issue?

    Besides, could you please post some code snippets so that we can try to reproduce this issue?

  • CaptainPriceCaptainPrice Member ✭✭

  • jezhjezh Member, Xamarin Team Xamurai

    Does your theme extend from Theme.MaterialComponents?

    Then you can try to set your theme to inherit from the following themes:


    A example:

    <style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
  • CaptainPriceCaptainPrice Member ✭✭

    when i debug application in my phone the button its working but in visual studio layout showing error

Sign In or Register to comment.