23年使用正常的SwipeDelMenuLayout:V1.3.0框架现在无法下载了居然,通过多次实验,最后总结如下方案,如果任何一步无法解决则继续执行下一步。
一、确保仓库添加正确
在allprojects下的repositories闭包里面添加
jcenter()
和maven {url 'https://jitpack.io'}
,具体可以看你的第三方框架需要添加什么仓库,一般都只需要上面两个。
我的build.gradle(Project)完整内容如下:
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
mavenCentral()
maven {
url 'https://jitpack.io'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
二、更换框架版本
github上有人评论失效问题,大佬建议更换1.2.1版本,我实验过完全可行。
三、手动添加依赖
直接下载jar包,然后添加到自己工程中即可。既然无法自动下载,那么我们就自己下载到本地。下面是从gradle拿到的缓存版本:
-
Google Drive:SwipeDelMenuLayout-V1.3.0.aar
每个人都是有缺陷的,即使外表看起来很无暇。