gradle报错问题

Posted 波子汽水yeah

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了gradle报错问题相关的知识,希望对你有一定的参考价值。

报错内容:

Could not resolve all dependencies for configuration ':compileClasspath'.

mac修改文件权限不够的问题,mac修改配置文件无权限

sudo chown $(whoami) /etc/profile

关键点配置

Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed

jdk19构建报错, gradle jvm 换成jdk17 再换成19又可以,没搞太清楚什么原因

使用国内仓库地址

int.d 目录下 init.gradle 文件

allprojects 
    repositories 
        maven  url 'file:///Users/maobo/Documents/repository'
        mavenLocal()
        maven  name "Alibaba" ; url "https://maven.aliyun.com/repository/public" 
        mavenCentral()
    

    buildscript  
        repositories  
            maven  name "Alibaba" ; url 'https://maven.aliyun.com/repository/public' 
            maven  name "M2" ; url 'https://plugins.gradle.org/m2/' 
        
    

以上是关于gradle报错问题的主要内容,如果未能解决你的问题,请参考以下文章