title: How to properly set up targetSdkVersion to 26 when using a library with support library
body: <p>I'm trying to up my target API to 26 (from 22), so far with some difficulty.</p>
  
  <p>For some reason my Gradle continues thinking that 25.3.1 is still the latest version of support libraries.</p>
  
  <p>So, here's my build.gradle for the library project:</p>
  
  <pre><code>apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 26
      buildToolsVersion '26.0.1'
      publishNonDefault true
  
      defaultConfig {
          targetSdkVersion 26
          minSdkVersion 14
          versionCode 1
          versionName "1.0"
      }
  }
  
  allprojects {
      repositories {
          jcenter()
          maven {
              url 'https://maven.google.com'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.android.support:support-v4:25.3.1'
  }
  </code></pre>
  
  <p>And the relevant sections from main project:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  android {
      compileSdkVersion 26
      buildToolsVersion "26.0.1"
  
      defaultConfig {
          targetSdkVersion 26
          minSdkVersion 14
      }
  }
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile project(path: ':MyLibrary', configuration: 'debug')
  }
  </code></pre>
  
  <p>It seems no matter what I do, Androd Studio will not recognise the repositories and offer to upgrade to support library version 26, yet complains when I include only version 25.</p>
  
  <p>I just completed looking every SO question that looked even remotely relevant to the issue and pretty much all of them just dealt with adding the new repository into dependencies. Am I adding it incorrectly?</p>
  
  <p>Trying to set support-v4 library to <a href="https://developer.android.com/topic/libraries/support-library/revisions.html" rel="nofollow noreferrer">26.0.2 version</a> manually just results in <a href="https://stackoverflow.com/questions/45357000/failed-to-resolve-com-android-supportappcompat-v726-0-0">"failed to resolve"</a> gradle error.</p>
  
  <p>What setting am I still missing to make this work for me?</p>