title: Adding toolbar to activity causes NoClassDefFoundError
body: <p>I'm Trying to add a toolbar to an activity.
  But I'm getting this error:</p>
  
  <pre><code>     java.lang.NoClassDefFoundError: android.support.v7.app.ActionBarActivityDelegateBase$2
          at android.support.v7.app.ActionBarActivityDelegateBase.ensureSubDecor(ActionBarActivityDelegateBase.java:304)
          at android.support.v7.app.ActionBarActivityDelegateBase.setContentView(ActionBarActivityDelegateBase.java:225)
          at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:102)
          at com.loqooapps.Startup.Startup.onCreate(Startup.java:198)
          at android.app.Activity.performCreate(Activity.java:5933)
  </code></pre>
  
  <p>The activity extends a Base Activity and in the Base activity
  which is abstract, I extend ActionBarActivity.</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
      StrictMode.setThreadPolicy(policy);
      setContentView(R.layout.startup);
      ButterKnife.inject(this);
      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      if(toolbar != null) {
          setSupportActionBar(toolbar);
          getSupportActionBar().setTitle("DEMO");
          getSupportActionBar().setHomeButtonEnabled(true);
          getSupportActionBar().setDisplayHomeAsUpEnabled(true);
      }
      baseApp = (App) this.getApplicationContext();
      yumeInterface = YuMeInterface.getYuMeInterface();
      yumeInterface.setHomeView(this);
      boolean bInitSuccess = yumeInterface.initYuMeSDK();
      if (!bInitSuccess) {
          Log.e(TAG, "Error Initializing YuMe SDK.");
      }
   }
  
   public abstract class MyBaseActivity extends ActionBarActivity{...}
      compile 'com.android.support:multidex:1.0.0'
      compile 'com.android.support:appcompat-v7:21.0.1'
      compile 'com.android.support:cardview-v7:21.0.3'
      compile 'com.android.support:recyclerview-v7:21.0.3'
  </code></pre>
  
  <p>This is my xml:</p>
  
  <pre><code> &lt;android.support.v7        compile 'com.android.support:multidex:1.0.0'
      compile 'com.android.support:appcompat-v7:21.0.1'
      compile 'com.android.support:cardview-v7:21.0.3'
      compile 'com.android.support:recyclerview-v7:21.0.3'.widget.Toolbar
      android:id        compile('com.android.support:support-v4:19.1.0') {
          force = true
      }="@+id/toolbar"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:minHeight="?attr/actionBarSize"
      android:background="@color/red"
      android:elevation="3dp"
  &lt;/android.support.v7.widget.Toolbar&gt;
  </code></pre>
  
  <p>And this is my styles.xml:</p>
  
  <pre><code>&lt;!-- Base application theme. --&gt;
  &lt;style name="AppBaseTheme" parent="Theme.AppCompat.Light.NoActionBar"&gt;
      &lt;item name="android:windowActionBarOverlay"&gt;false&lt;/item&gt;
      &lt;item name="android:windowBackground"&gt;@null&lt;/item&gt;
      &lt;item name="android:windowDisablePreview"&gt;false&lt;/item&gt;
      &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
      &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>values-v21/styles.xml:</p>
  
  <pre><code>&lt;style name="        compile('com.android.support:support-v4:19.1.0') {
          force = true
      }AppTheme" parent="AppBaseTheme"&gt;
  &lt;/style&gt;
  
      compile('com.android.support:support-v4:19.1.0') {
          force = true
      }
  </code></pre>
  
  <p>The minsdk is set to 16
  and
  the target is se        compile('com.android.support:support-v4:19.1.0') {
              force = true
          }t to 21</p>
  
  <p>build.gradle</p>
  
  <pre><code>    compile 'com.android.support:multidex:1.0.0'
      compile 'com.android.support:appcompat-v7:21.0.3'
      compile 'com.android.support:cardview-v7:21.0.3'
      compile 'com.android.support:recyclerview-v7:21.0.3'
      compile('com.android.support:support-v4:19.1.0') {
          force = true
      }
  </code></pre>
  
  <p>Android Manifest:</p>
  
  <pre><code> &lt;activity
          android:name=".Startup.Startup"
          android:screenOrientation="portrait"
          android:theme="@style/AppBaseTheme"
  </code></pre>
  
  <p>The error in xml:</p>
  
  <pre><code>  java.lang.NoSuchMethodError: android.support.v4.content.ContextCompat.getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
  at android.support.v7.internal.widget.TintManager.getDrawable(TintManager.java:133)
  at android.support.v7.internal.widget.TintTypedArray.getDrawable(TintTypedArray.java:62)
  at android.support.v7.widget.Toolbar.&lt;init&gt;(Toolbar.java:249)
  at android.support.v7.widget.Toolbar.&lt;init&gt;(Toolbar.java:191)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
  at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:396)
  at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:100)
  at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:176)
  at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:207)
  at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:132)
  at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:117)
  at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858)
  at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802)
  at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)
  at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:809)
  at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
  at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:400)
  at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:332)
  at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
  at com.android.tools.idea.rendering.RenderService$5.compute(RenderService.java:708)
  at com.android.tools.idea.rendering.RenderService$5.compute(RenderService.java:697)
  at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
  at com.android.tools.idea.rendering.RenderService.createRenderSession(RenderService.java:697)
  at com.android.tools.idea.rendering.RenderService.render(RenderService.java:816)
  at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:646)
  at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1700(AndroidLayoutPreviewToolWindowManager.java:82)
  at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:589)
  at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
  at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
  at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
  at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
  at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7.run(AndroidLayoutPreviewToolWindowManager.java:584)
  at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
  at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
  at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
  at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
  at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
  at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
  at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
  at com.intellij.util.Alarm$Request$1.run(Alarm.java:327)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>What gives?</p>