我正在android中创建一个新项目,它不断给出这个错误:

Error:Failed to find Build Tools revision 26.0.2
"install.build.tools" Install Build Tools 26.0.2 and sync project

但是我安装了SDK Build Tools 27.x.x.我在Stackoverflow中找到了一个答案,我需要在build.gradle文件中更改它(从26到27),但我唯一的build.gradle文件是没有这样的选项可用的文件 . 该文件如下所示:

// Top-level build file where you can add configuration options common to 
all sub-projects/modules.  

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  
}

我正在使用android studio 3.0.1 Windows 10 .
好的,我找到了一种通过手动安装构建工具v26.0.2来查看build.gradle文件的方法 . 但现在我陷入无法解决':app@debugAndroidTest/compileClasspath'的依赖:无法解决com.android.support.test:runner:1.0.1 .

无法解析com.android.support.test:runner:1.0.1 . 要求:项目:app

没有缓存版本的com.android.support.test:runner:1.0.1可用于离线模式 . 无法解析':app @ debugUnitTest / compileClasspath'的依赖关系:无法解析junit:junit:4.12 .

无法解决junit:junit:4.12 . 要求:项目:app

没有junit:junit:4.12的缓存版本可用于离线模式 . 无法解析':app @ debugAndroidTest / compileClasspath'的依赖关系:无法解析com.android.support.test.espresso:espresso-core:3.0.1 .

无法解析com.android.support.test.espresso:espresso-core:3.0.1 . 要求:项目:app

没有缓存版本的com.android.support.test.espresso:espresso-core:3.0.1可用于离线模式 . 现在这些是我必须逐个手动找到的许多错误,或者有人可以告诉我一个更好的方法 .