AndroidStudio gradle相关问题

Could not download fastutil.jar (it.unimi.dsi:fastutil:7.2.0)

在gradle配置文件中(build.gradle)

解决方法:

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

buildscript {
    
    repositories {
        maven{ url = "http://maven.aliyun.com/nexus/content/groups/public/" }//加入这一行代码
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0'
        

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven{ url = "http://maven.aliyun.com/nexus/content/groups/public/" }//加入这一行代码
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Android Studio:Could not find any version that matches com.android.support:appcompat-v7:29.+.

对如下目录选中的文件进行修改

解决方法

将黄色标注的那一行改为如图的代码就行。

猜你喜欢

转载自blog.csdn.net/qq_41313587/article/details/103988217