Could not find support-compat.aar (com.android.support:support-compat:26.0.1)

博主导入新项目时遇到找不到support-compat.aar的错误,提示从Android SDK Manager安装Android Support Repository。第一次出错时修改很久才解决,此次再次出错差点遗忘。网上查询无果后,通过修改gradle为本地版本解决问题,并将修改步骤记录。

导入新项目时报了这个错

先贴出完整的错误

Could not find support-compat.aar (com.android.support:support-compat:26.0.1).
Searched in the following locations:

    https://jcenter.bintray.com/com/android/support/support-compat/26.0.1/support-compat-26.0.1.aar

Please install the Android Support Repository from the Android SDK Manager.
Open Android SDK Manager

 第二次出现这个错了,第一次出错改了我好久,这次又出现这个错,我居然还差点记不起来了,还是得记录一下,不能在同一个地方跌倒三次

网上查了一大堆,都没有改好

我使用的方式是修改gradle为本地的版本,就OK了

以下是修改步骤

 

 

Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.10.1.aar -> core-1.10.1-runtime (androidx.core:core:1.10.1) and support-compat-26.1.0.aar -> support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.10.1.aar -> core-1.10.1-runtime (androidx.core:core:1.10.1) and support-compat-26.1.0.aar -> support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.10.1.aar -> core-1.10.1-runtime (androidx.core:core:1.10.1) and support-compat-26.1.0.aar -> support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.10.1.aar -> core-1.10.1-runtime (androidx.core:core:1.10.1) and support-compat-26.1.0.aar -> support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.10.1.aar -> core-1.10.1-runtime (androidx.core:core:1.10.1) and support-compat-26.1.0.aar -> support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.10.1.aar -> core-1.10.1-runtime (androidx.core:core:1.10.1) and support-compat-26.1.0.aar -> support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.10.1.aar -> core-1.10.1-runtime (androidx.core:core:1.10.1) and support-compat-26.1.0.aar -> support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.10.1.aar -> core-1.10.1-runtime (androidx.core:core:1.10.1) and support-compat-26.1.0.aar -> support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.10.1.aar -> core-1.10.1-runtime (androidx.core:core:1.10.1) and support-compat-26.1.0.aar -> support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0) Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.10.1.aar -> core-1.10.1-runtime (androidx.core:core:1.10.1) and support-compat-26.1.0.aar -> support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0) Learn how to fix dependency resolution errors at https://d.android.com/r/tools/classpath-sync-errors
最新发布
09-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值