title: Xamarin.Android Support Library
body: <p>I'm trying to implement James Montemagno's navigation drawer (<a href="https://github.com/jamesmontemagno/Xamarin-Templates" rel="nofollow noreferrer">https://github.com/jamesmontemagno/Xamarin-Templates</a>) and I'm running into issues. When I create a new project, I don't run into any issues, but when I attempt to add the support libraries to an existing project, I get the following error:</p>
  
  <blockquote>
    <p>The type or namespace name 'Support' does not exist in the namespace 'my namespace' (are you missing an assembly reference)?</p>
  </blockquote>
  
  <p>Here is my code (The problem code is the very last line. I haven't gone past this because I'd like to understand what's happening):</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  using Android.App;
  using Android.Content;
  using Android.OS;
  using Android.Runtime;
  using Android.Views;
  using Android.Widget;
  
  using Android.Support.V7.App;
  using Android.Support.V4.Widget;
  using Android.Support.V4.View;
  
  using MyApp.Parse;
  using MyApp.Android.Core.Login;
  using MyApp.Android.Core.Utils;
  
  namespace MyApp.Android.Core.Main
  {
      [Activity(Label = "MainActivity", Icon = "@drawable/Icon")]
      public class MainActivity : BaseActivity
      {
          private MyActionBarDrawerToggle mDrawerToggle;
          private string mDrawerTitle;
          private string mTitle;
  
          private DrawerLayout mDrawerLayout;
          private ListView mDrawerListView;
          private DrawerMenuAdapter mAdapter;
  
          protected override int LayoutResource
          {
              get
              {
                  return Resource.Layout.Main;
              }
          }
  
          protected override void OnCreate(Bundle savedInstanceState)
          {
              base.OnCreate(savedInstanceState);
  
              // setup drawer
              mTitle = mDrawerTitle = Title;
              mDrawerLayout = FindViewById&lt;DrawerLayout&gt;(Resource.Id.drawer_layout);
              mDrawerListView = FindViewById&lt;ListView&gt;(Resource.Id.left_drawer);
  
              // create adapter for drawer
              mDrawerListView.Adapter = mAdapter = new DrawerMenuAdapter(this);
  
              // set click handler
              mDrawerListView.ItemClick += (sender, args) =&gt; ListItemClicked(args.Position);
  
              // set DrawerShadow
              mDrawerLayout.SetDrawerShadow(Resource.Drawable.drawer_shadow_dark, (int)GravityCompat.Start);
  
              // set DrawerToggle - the animation that happens with the indicator next to the actionbar
              mDrawerToggle = new MyActionBarDrawerToggle(this, mDrawerLayout, Toolbar, 
                  Resource.String.drawer_open, 
                  Resource.String.drawer_close);
  
              // display current fragment's title and update the options menu
              mDrawerToggle.DrawerClosed += (o, args) =&gt;
              {
                  this.SupportActionBar.Title = mTitle;
                  this.SupportInvalidateOptionsMenu();
              };
  
              // display the drawer title and update the options menu
              mDrawerToggle.DrawerOpened += (o, args) =&gt;
              {
                  this.SupportActionBar.Title = mDrawerTitle;
                  this.SupportInvalidateOptionsMenu();
              };
  
              // set the drawer listener
              mDrawerLayout.SetDrawerListener(mDrawerToggle);
  
              // if first time, click first item
              if (savedInstanceState == null)
                  ListItemClicked(0);
  
              //
              Button logout = FindViewById&lt;Button&gt;(Resource.Id.logoutButton);
  
              logout.Click += (object sender, EventArgs e) =&gt;
              {
                  Toast.MakeText(this, APIHandler.Logout(), ToastLength.Long).Show();
                  StartActivity(typeof(DispatchActivity));
              };
          }
  
          int oldPosition = -1;
          private void ListItemClicked(int position)
          {
              // this way we don't load twice
              if (position == oldPosition)
                  return;
  
              oldPosition = position;
  
              Android.Support.V4.App.Fragment fragment = null;
          }
      }
  }
  </code></pre>
  
  <p>I'm using Visual Studio and I've tried importing <code>Xamarin.Android.Support.v4</code> and <code>Xamarin.Android.Support.v7.AppCompat</code> using both Reference and Components within my project. I can find Android.Support when I am 'using' at the beginning of a class, but I cannot locate Android.Support once I'm in the declaration of the class.</p>
  
  <p>Does anyone know how to fix this? I'm new to C#, Xamarin, and Visual Studio, so I'm kind of at a loss.</p>
  
  <p>I know I can fix this by just starting a new project and copying over most of my old code, but I'd like to know why I'm getting this error.</p>