L1GhTUA L1GhTUA - 16 days ago 5
C# Question

Have an "'Resource.Attribute' does not contain a definition for 'actionBarSize'" error

Was trying to debug an empty app and got "'Resource.Attribute' does not contain a definition for 'actionBarSize'" error. I have reinstalled android SDK's.

public static void UpdateIdValues()
{
global::Xamarin.Forms.Platform.Android.Resource.Attribute.actionBarSize = global::L1NQ.Droid.Resource.Attribute.actionBarSize;
}
public partial class Attribute
{

static Attribute()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}

private Attribute()
{
}
}

Answer

These actions helped:

  1. Delete Bin and Obj folders in project folder
  2. Delete contents of C:\Users{your username}\AppData\Local\Xamarin\zips
  3. Rebuild project