Could not find support-media-compat.aar

 

 

implementation(name: 'sdk-gp-4.4.4.0', ext: 'aar')

升级android studio到3.3版本,今天checkout到历史tag上运行android项目,死活报错

报错如下:

Could not find support-media-compat.aar

或者如下报错:

ERROR: Failed to resolve: support-media-compat
Affected Modules: app

ERROR: Failed to resolve: support-core-utils
Affected Modules: xxx

ERROR: Failed to resolve: support-compat
Affected Modules: xxxxxx
 


最后意外发现是google()仓库位置的问题
报错配置:

allprojects {
    repositories {
        mavenCentral()//如果 jcenter 很慢,尝试添加 mavenCentral 并调整到首行
        jcenter()
//        maven { url 'https://maven.google.com' }
        maven { url "https://jitpack.io" }
        maven {  url "https://raw.githubusercontent.com/HyphenateInc/Hyphenate-SDK-Android/master/repository" }
        google()
    }
}

把google()放到第一位即可,build.gread里面有两个repositories,都把google()提到第一行即可

allprojects {
    repositories {
        google()
        mavenCentral()//如果 jcenter 很慢,尝试添加 mavenCentral 并调整到首行
        jcenter()
//        maven { url 'https://maven.google.com' }
        maven { url "https://jitpack.io" }
        maven {  url "https://raw.githubusercontent.com/HyphenateInc/Hyphenate-SDK-Android/master/repository" }

    }
}
repositories {
    google()
    mavenCentral()//如果 jcenter 很慢,尝试添加 mavenCentral 并调整到首行
    jcenter()
    maven {
        url "https://www.jitpack.io"
    }
}


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值