title: Could not resolve com.android.support:appcompat-v7:26.1.0 in Android Studio new project
body: <p>I know about this questions:</p>
  
  <p><a href="https://stackoverflow.com/q/45103230/2263683">Failed to resolve: com.android.support:cardview-v7:26.0.0 android</a></p>
  
  <p><a href="https://stackoverflow.com/q/47035406/2263683">Could not resolve com.android.support:appcompat-v7:26.1.0 [duplicate]</a></p>
  
  <p>And I've read this documentations:</p>
  
  <p><a href="https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html" rel="noreferrer">Migrate to Android Plugin for Gradle 3.0.0</a></p>
  
  <p><a href="https://developer.android.com/about/versions/oreo/android-8.0-migration.html#ptb" rel="noreferrer">Migrating to Android 8.0</a></p>
  
  <p><em>So I'm posting this question believing its not a duplicate.</em></p>
  
  <p>I've installed Android Studio 3.0.1. I didn't have any previous version before and I started a new project.</p>
  
  <p>Every setting in Gradle file have been set by Android Studio itself and I've checked them all.</p>
  
  <p>These are the file contents:</p>
  
  <p><strong>build.gradle (Module:app)</strong></p>
  
  <pre><code>    apply plugin: 'com.android.application'
  
      android {
          compileSdkVersion 26
          defaultConfig {
              applicationId "com.example.administrator.as301test"
              minSdkVersion 16
              targetSdkVersion 26
              versionCode 1
              versionName "1.0"
              testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          }
          buildTypes {
              release {
                  minifyEnabled false
                  proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
              }
          }
      }
  
      dependencies {
          implementation fileTree(dir: 'libs', include: ['*.jar'])
          implementation 'com.android.support:appcompat-v7:26.1.0'
          implementation 'com.android.support.constraint:constraint-layout:1.0.2'
          implementation 'com.android.support:design:26.1.0'
          testImplementation 'junit:junit:4.12'
          androidTestImplementation 'com.android.support.test:runner:1.0.1'
          androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
      }
  </code></pre>
  
  <p><strong>Top level build.gradle</strong></p>
  
  <pre><code>buildscript {
  
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.0.1'
  
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p><strong>gradle-wrapper.properties</strong></p>
  
  <pre><code>distributionBase=GRADLE_USER_HOME
  distributionPath=wrapper/dists
  zipStoreBase=GRADLE_USER_HOME
  zipStorePath=wrapper/dists
  distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
  </code></pre>
  
  <p>I use <code>google()</code> in repositories as <a href="https://developer.android.com/about/versions/oreo/android-8.0-migration.html#ptb" rel="noreferrer">here</a> clearly says:</p>
  
  <blockquote>
  <pre><code>  // If you're using a version of Gradle lower than 4.1, you must instead use:
       // maven {
       //     url 'https://maven.google.com'
       // }
  </code></pre>
  </blockquote>
  
  <p>My gradle version is 4.1 so I don't need above code.</p>
  
  <p>But I still get this error as the others have been asking about:</p>
  
  <blockquote>
    <p>Error:Unable to resolve dependency for ':app@debug/compileClasspath':
    Could not resolve com.android.support:appcompat-v7:26.1.0.</p>
  </blockquote>
  
  <p>Why should I get this error when I'm creating a new project in <code>AS 3.0.1</code> and it has been set all the necessary settings?</p>
  
  <p><strong>Update</strong></p>
  
  <p>@Rohit's answer somehow solved the issue but I still get same error for some other dependencies.</p>
  
  <blockquote>
    <p>Could not resolve com.android.support.test:runner:1.0.1</p>
    
    <p>Could not resolve
    com.android.support.test.espresso:espresso-core:3.0.1</p>
    
    <p>Could not resolve junit:junit:4.12</p>
  </blockquote>