title: Android studio pulls wrong version of sdk to compile project
body: <p>I want to compile my project using sdk version 22 however android studio uses version 23, so it gives some error. I use Android studio 1.3 and I don't want to use sdk 23(I have some deprecated methods which I don't want to replace them at this time). This is my gradle file:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  android {
  compileSdkVersion 22
  buildToolsVersion "22.0.1"
  defaultConfig {
      applicationId "ir.mhealth.healthnotation"
      minSdkVersion 16
      targetSdkVersion 22
      versionCode 2
      versionName "1.0.0.1"
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  }
  dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:appcompat-v7:22.2.0'
  compile 'com.android.support:recyclerview-v7:22.2.0'
  compile 'com.jjoe64:graphview:4.+'
  compile 'com.afollestad:material-dialogs:0.7.+'
  compile 'com.google.android.gms:play-services-analytics:7.8.0'
  }
  </code></pre>
  
  <p>When I run gradle dependency report I get this response:</p>
  
  <pre><code>    ------------------------------------------------------------
  Project :app
  ------------------------------------------------------------
  
  _debugAndroidTestApk - ## Internal use, do not manually configure ## No dependencies
  
  _debugAndroidTestCompile - ## Internal use, do not manually configure ## No dependencies
  
  _debugApk - ## Internal use, do not manually configure ##
  +--- com.android.support:appcompat-v7:22.2.0 -&gt; 23.0.0
  |    \--- com.android.support:support-v4:23.0.0
  |         \--- com.android.support:support-annotations:23.0.0
  +--- com.android.support:recyclerview-v7:22.2.0 -&gt; 23.0.0
  |    +--- com.android.support:support-annotations:23.0.0
  |    \--- com.android.support:support-v4:23.0.0 (*)
  +--- com.jjoe64:graphview:4.+ -&gt; 4.0.1
  |    \--- com.android.support:support-v4:21.0.3 -&gt; 23.0.0 (*)
  +--- com.afollestad:material-dialogs:0.7.+ -&gt; 0.7.9.1
  |    +--- com.android.support:support-v4:23.0.0 (*)
  |    +--- com.android.support:appcompat-v7:23.0.0 (*)
  |    +--- com.android.support:recyclerview-v7:23.0.0 (*)
  |    \--- com.android.support:support-annotations:23.0.0
  \--- com.google.android.gms:play-services-analytics:7.8.0
       \--- com.google.android.gms:play-services-base:7.8.0
            \--- com.android.support:support-v4:22.2.0 -&gt; 23.0.0 (*)
  
  debugCompile - ## Internal use, do not manually configure ##
  +--- com.android.support:appcompat-v7:22.2.0 -&gt; 23.0.0
  |    \--- com.android.support:support-v4:23.0.0
  |         \--- com.android.support:support-annotations:23.0.0
  +--- com.android.support:recyclerview-v7:22.2.0 -&gt; 23.0.0
  |    +--- com.android.support:support-annotations:23.0.0
  |    \--- com.android.support:support-v4:23.0.0 (*)
  +--- com.jjoe64:graphview:4.+ -&gt; 4.0.1
  |    \--- com.android.support:support-v4:21.0.3 -&gt; 23.0.0 (*)
  +--- com.afollestad:material-dialogs:0.7.+ -&gt; 0.7.9.1
  |    +--- com.android.support:support-v4:23.0.0 (*)
  |    +--- com.android.support:appcompat-v7:23.0.0 (*)
  |    +--- com.android.support:recyclerview-v7:23.0.0 (*)
  |    \--- com.android.support:support-annotations:23.0.0
  \--- com.google.android.gms:play-services-analytics:7.8.0
       \--- com.google.android.gms:play-services-base:7.8.0
            \--- com.android.support:support-v4:22.2.0 -&gt; 23.0.0 (*)
  
  -debugUnitTestApk - ## Internal use, do not manually configure ## 
  no dependencies
  
  -debugUnitTestCompile - ## Internal use, do not manually configure ## 
  no dependencies
  
  _releaApk - ## Internal use, do not manually configure ##
  +--- com.android.support:appcompat-v7:22.2.0 -&gt; 23.0.0
  |    \--- com.android.support:support-v4:23.0.0
  |         \--- com.android.support:support-annotations:23.0.0
  +--- com.android.support:recyclerview-v7:22.2.0 -&gt; 23.0.0
  |    +--- com.android.support:support-annotations:23.0.0
  |    \--- com.android.support:support-v4:23.0.0 (*)
  +--- com.jjoe64:graphview:4.+ -&gt; 4.0.1
  |    \--- com.android.support:support-v4:21.0.3 -&gt; 23.0.0 (*)
  +--- com.afollestad:material-dialogs:0.7.+ -&gt; 0.7.9.1
  |    +--- com.android.support:support-v4:23.0.0 (*)
  |    +--- com.android.support:appcompat-v7:23.0.0 (*)
  |    +--- com.android.support:recyclerview-v7:23.0.0 (*)
  |    \--- com.android.support:support-annotations:23.0.0
  \--- com.google.android.gms:play-services-analytics:7.8.0
       \--- com.google.android.gms:play-services-base:7.8.0
            \--- com.android.support:support-v4:22.2.0 -&gt; 23.0.0 (*)
  
  -releaseCompile - ## Internal use, do not manually configure ##
  +--- com.android.support:appcompat-v7:22.2.0 -&gt; 23.0.0
  |    \--- com.android.support:support-v4:23.0.0
  |         \--- com.android.support:support-annotations:23.0.0
  +--- com.android.support:recyclerview-v7:22.2.0 -&gt; 23.0.0
  |    +--- com.android.support:support-annotations:23.0.0
  |    \--- com.android.support:support-v4:23.0.0 (*)
  +--- com.jjoe64:graphview:4.+ -&gt; 4.0.1
  |    \--- com.android.support:support-v4:21.0.3 -&gt; 23.0.0 (*)
  +--- com.afollestad:material-dialogs:0.7.+ -&gt; 0.7.9.1
  |    +--- com.android.support:support-v4:23.0.0 (*)
  |    +--- com.android.support:appcompat-v7:23.0.0 (*)
  |    +--- com.android.support:recyclerview-v7:23.0.0 (*)
  |    \--- com.android.support:support-annotations:23.0.0
  \--- com.google.android.gms:play-services-analytics:7.8.0
       \--- com.google.android.gms:play-services-base:7.8.0
            \--- com.android.support:support-v4:22.2.0 -&gt; 23.0.0 (*)
  
  
  .
  .
  .
  
  
  wearApp - Link to a wear app to embed for object 'main'.
  No dependencies
  
  BUILD SUCCESSFUL
  </code></pre>
  
  <p>Why it tries to replace sdk 22 with 23??? How can I fix it?</p>
  
  <p>(I should mention that I didn't have any problems until I decided to update my android studio to version 1.4. After updating, it downloaded sdk 23 and while I hadn't change my gradle file, android studio tried to compile project with sdk 23 as you can see. I uninstall android studio and install old version but the problem didn't solve. I knew version 1.4 use sdk 23 for new project, but my project was not new. Also I use old version of android studio now and it didn't solve my problem)  </p>