ERROR: Could not find com.android.tools.build:gradle:3.5.2

前端 未结 3 1714
旧巷少年郎
旧巷少年郎 2021-01-15 20:31
ERROR: Could not find com.android.tools.build:gradle:3.5.2.
Searched in the following locations:
  - 

https://dl.google.com/dl/android/maven2/com/a

3条回答
  •  温柔的废话
    2021-01-15 20:38

    Follow these steps:

    1. Copy paste the below code into Project level build.gradle file:
    // 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.5.2'
        }
    }
    
    allprojects {
        repositories {
            google()
            jcenter()
    
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    
    
    1. Clean your project from Build > Clean Project
    2. Rebuild you project from Build > Rebuild Project
    3. Make Project from Build > Make Project
    4. Then, File > Invalidate Caches/Restart

提交回复
热议问题