首页 > 其他分享 >settings.gradle配置

settings.gradle配置

时间:2022-10-24 20:44:15浏览次数:66  
标签:aliyun repository settings url 配置 gradle maven https com

Android Studio版本:android-studio-2021.3.1.16-windows.exe
报错:Plugin [id: 'com.android.application', version: '7.3.0', apply: false] was not found in any of the following sources:
修改settings.gradle配置为:

pluginManagement {
    repositories {
        maven { url "https://jitpack.io" }
        maven { url 'https://maven.aliyun.com/repository/releases' }
        maven { url 'https://maven.aliyun.com/repository/jcenter' }
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/central' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        maven { url "https://jitpack.io" }
        maven { url 'https://maven.aliyun.com/repository/releases' }
        maven { url 'https://maven.aliyun.com/repository/jcenter' }
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/central' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        google()
        mavenCentral()
    }
}
rootProject.name = "My Application"
include ':app'

  

标签:aliyun,repository,settings,url,配置,gradle,maven,https,com
From: https://www.cnblogs.com/xsj1989/p/16822735.html

相关文章