Error: Could not find Build Tools 26.0.2 "install.build.tools" version. Install Build Tools 26.0.2 and the synchronization project.

I am creating a new project in android and it continues to give this error:

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

but I have the Build Tools 27.xx SDK installed. I found the answer somewhere in Stackoverflow, that I need to change it in the build.gradle file (from 26 to 27), but the only build.gradle file that I have is one in which such an option is not available. The file is as follows:

// 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  
}  

I am using Android version 3.0.1 of Windows 10.
Well, I found a way to view the build.gradle file by manually installing the build tools v26.0.2. But now I'm stuck in Unable to resolve the dependency for: app @ debugAndroidTest / compileClasspath: Failed to resolve com.android.support.test: runner: 1.0.1.

com.android.support.test: runner: 1.0.1. :   :

com.android.support.test: runner: 1.0.1 . : app @debugUnitTest/compileClasspath: junit: junit: 4.12.

junit: junit: 4.12. :   :

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. :   :

There is no cached version of com.android.support.test.espresso: espresso-core: 3.0.1 for offline mode. now these are many errors that I have to find manually one at a time, or someone can just tell me the best way.

+4
source share

Source: https://habr.com/ru/post/1690936/


All Articles