title: Didn't find class "android.support.v4.content.ContextCompat" even after adding all the libraries
body: <p>When I change my targetSDK to greater than 22, the compiler does not allow to use permissions directly. The permissions have to be provided by user for which I have to use below code :</p>
  
  <pre><code>if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)!= PackageManager.PERMISSION_GRANTED) {
  
          ActivityCompat.requestPermissions(this,
                  new String[]{Manifest.permission.ACCESS_FINE_LOCATION},
                  MY_PERMISSSIONS_REQUEST_FINE_LOCATION);
  
   }
  </code></pre>
  
  <p>But I keep getting the below error </p>
  
  <pre><code>Didn't find class "android.support.v4.content.ContextCompat"
  </code></pre>
  
  <p>I have added all the required files for ContextCompat and ActivityCompat but I keep getting this error every time. Here is my build.gradle </p>
  
  <p>[EDIT] Adding the whole gradle file</p>
  
  <pre><code>apply plugin: 'com.android.library'
  
      android {
          compileSdkVersion 25
          buildToolsVersion "25.0.2"
  
          defaultConfig {
              minSdkVersion 15
              targetSdkVersion 25
              versionCode 1
              versionName "1.0"
  
              testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  
          }
          buildTypes {
              release {
                  minifyEnabled false
                  proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
              }
          }
      }
  
      dependencies {
          compile fileTree(include: ['*.jar'], dir: 'libs')
          compile 'com.android.support:appcompat-v7:25.2.0'
          compile files('libs/classes.jar')
          compile 'com.android.support:support-v4:25.2.0'
      }
  
      //task to delete the old jar
      task deleteOldJar(type: Delete) {
          delete '/Users/kushagragupta/Desktop/Kushagra/STURFEE/Sturfee.Unity.Mobile.IMUGPSTest/Assets/AndroidPlugin.jar'
      }
  
      //task to export contents as jar
      task exportJar(type: Copy) {
          from('build/intermediates/bundles/release/')
          into('/Users/kushagragupta/Desktop/Kushagra/STURFEE/Sturfee.Unity.Mobile.IMUGPSTest/Assets/')
          include('classes.jar')
          ///Rename the jar
          rename('classes.jar', 'AndroidPlugin.jar')
      }
  
      exportJar.dependsOn(deleteOldJar, build)
  </code></pre>
  
  <p>I could literally see these libraries in Android Studio <a href="https://i.stack.imgur.com/i9gcw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i9gcw.png" alt="enter image description here"></a></p>
  
  <p>I've been stuck on this since last 2 days and have no idea what else can be done to fix this. </p>