Xamarin Forms - The type or namespace name 'Label' does not exist in the namespace...

Ed_OphanimEd_Ophanim Member ✭✭
edited June 2018 in Xamarin.Android

Hi i get this error this morning, and i don't know why or what is producing it

some body told i must use Android.App to be able to use ActivityAttribute class and thouse properties but i'm already using it.
I understand that error CS0246 it's for reference, i tried to remove and readd the refrence with out success and the error persist.
thank you for your help.

Error :

CS0246 - The type or namespace name 'Label' does not exist in the namespace 'System.Windows.Controls' (are you missing an assembly reference?)

it's also on Icon, Theme, MainLauncher

using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Xamarin.Forms;

namespace DatePickerService.Droid
[Activity(Label = "DatePickerService", Icon = "@drawable/calen", 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());



  • BillyLiuBillyLiu Member, Xamarin Team Xamurai

    Does it happen to a blank project? Have you tried to clean and rebuild the project? What's the version of xamarin.forms?

Sign In or Register to comment.