Forum Xamarin.Forms
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.

Error When Build The New Project

EmreAltanEmreAltan USMember ✭✭

I'm new with Xamarin and try to learn but I'm getting stupid errors since I started to try. I'm creating new Blank Xamarin.Forms PCL project and building it without any change. Then I'm getting these errors:

'Resource.Layout' does not contain a definition for 'Tabbar'
'Resource.Layout' does not contain a definition for 'Toolbar'

My MainActivity.cs file:

namespace Deneme.Droid
    [Activity(Label = "Deneme", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
        protected override void OnCreate(Bundle bundle)
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource = Resource.Layout.Toolbar;


            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());

I also got these errors on Native Android app too. What am I doing wrong?

Please help me, I'll start to crush my PC now. Thanks..

Best Answer


  • ArtdemsArtdems FRMember ✭✭

    If this is the original solution, in your Android project, you can have a "Resources" file. In this file we find "layout" and, in this case, we have the last "Tabbar.axml" and Toolbar.axml ". Can you show this two files please?

  • EmreAltanEmreAltan USMember ✭✭

    @Artdems Hi, thanks for the fast reply. My Solution Explorer looks like this;

    As I said before, I didn't made any change after creating project.

  • ArtdemsArtdems FRMember ✭✭

    Okay, I think we have to stop VS, restart and clean and rebuild. I had problems like this when VS stopped recognizing some of my code, and the off/on-> clean / rebuild function still works for me.

  • EmreAltanEmreAltan USMember ✭✭

    @DarshanJS Thanks for help. The error was about SDK. I deleted Android SDK Build-tools Rev. 24 and errors have resolved.

  • hello, I have the same problem it's been days since I'm trying to figure that out. what to do

Sign In or Register to comment.