title: java.lang.NoSuchMethodError: No static method getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
body: <p>I updated Android Studio to 2.2 and my project won't build anymore. My Activity's super.onCreate(savedInstanceState) gives me an error:</p>
  
  <pre><code>java.lang.NoSuchMethodError: No static method getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; in class Landroid/support/v4/content/ContextCompat; or its super classes (declaration of 'android.support.v4.content.ContextCompat' appears in /data/app/x.y.z-1/base.apk:classes32.dex)
                                                                       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:197)
                                                                       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:185)
                                                                       at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:720)
                                                                       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:190)
                                                                       at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:77)
                                                                       at android.support.v7.app.AppCompatDelegateImplBase.&lt;init&gt;(AppCompatDelegateImplBase.java:127)
                                                                       at android.support.v7.app.AppCompatDelegateImplV9.&lt;init&gt;(AppCompatDelegateImplV9.java:147)
                                                                       at android.support.v7.app.AppCompatDelegateImplV11.&lt;init&gt;(AppCompatDelegateImplV11.java:27)
                                                                       at android.support.v7.app.AppCompatDelegateImplV14.&lt;init&gt;(AppCompatDelegateImplV14.java:50)
                                                                       at android.support.v7.app.AppCompatDelegateImplV23.&lt;init&gt;(AppCompatDelegateImplV23.java:29)
                                                                       at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:199)
                                                                       at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:181)
                                                                       at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:521)
                                                                       at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)
                                                                       at zz.yyy.xxx.activities.AsdActivity.onCreate(AsdActivity.java:12)
                                                                       at android.app.Activity.performCreate(Activity.java:6904)
                                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136)
                                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3266)
                                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415)
                                                                       at android.app.ActivityThread.access$1100(ActivityThread.java:229)
                                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821)
                                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                       at android.os.Looper.loop(Looper.java:148)
                                                                       at android.app.ActivityThread.main(ActivityThread.java:7325)
                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
  </code></pre>
  
  <p>I made a completely new Activity to see if it was my code that was causing the problem but it didn't help. Here's the activity:</p>
  
  <pre><code>import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  
  public class AsdActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_asd);
      }
  }
  </code></pre>
  
  <p>And here's my build.gradle (app)</p>
  
  <pre><code>buildscript {
      repositories {
          maven { url 'https://maven.fabric.io/public' }
      }
  
      dependencies {
          classpath 'io.fabric.tools:gradle:1.+'
  
      }
  }
  apply plugin: 'com.android.application'
  apply plugin: 'io.fabric'
  
  repositories {
      maven { url 'https://maven.fabric.io/public' }
  }
  
  android {
      compileSdkVersion 24
      buildToolsVersion "23.0.3"
  
          defaultConfig {
             minSdkVersion 21
             targetSdkVersion 24
             ...
          }
  
      buildTypes {
  
          debug {
              ...
              minifyEnabled false
          }
  
          release {
              ...
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  
  }
  
  dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
      testCompile 'junit:junit:4.12'
      compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
          transitive = true;
      }
  
      compile project(':ViewLib')
      compile files('libs/commons-io-2.5.jar')
      compile project(':GridHeaders')
      compile 'com.amazonaws:aws-android-sdk-s3:2.2.16'
      compile 'com.google.code.gson:gson:2.6.2'
      compile 'com.squareup.okhttp3:okhttp:3.2.0'
      compile 'com.github.franmontiel:PersistentCookieJar:v0.9.3'
      compile 'com.amazonaws:aws-android-sdk-mobileanalytics:2.2.9'
      compile('com.facebook.fresco:fresco:0.11.0') {
          exclude module: 'support-v4'
      }
      compile 'org.apache:pdfbox-android:1.8.9.0'
      compile 'com.android.support:appcompat-v7:24.2.1'
      compile 'com.android.support:design:24.2.1'
  }
  </code></pre>
  
  <p>Before this error I got this: <a href="https://stackoverflow.com/questions/39049107/java-lang-nosuchmethoderror-no-static-method-setonapplywindowinsetslistener">java.lang.NoSuchMethodError: No static method setOnApplyWindowInsetsListener</a></p>
  
  <p>And before that I had another similar error. Both were fixed by updating my support libraries. Now I got the newest (24.2.1) version of appcompatv7 and design libraries so I don't know how what I can do anymore.</p>