Android Studio导入项目 kotlin库一直加载问题 (导入失败)

it2023-06-18  68

导入项目 kotlin库一直加载问题 (导入失败)

1.(下载过慢)使用阿里云的国内镜像仓库地址,就可以快速的下载需要的文件

build.gradle :buildscript { repositories { //加入下面这句 maven { url ‘http://maven.aliyun.com/nexus/content/groups/public/’ } maven { url ‘http://maven.aliyun.com/nexus/content/repositories/jcenter’ } maven { url ‘http://maven.aliyun.com/nexus/content/repositories/google’ } maven { url ‘http://maven.aliyun.com/nexus/content/repositories/gradle-plugin’ }

}

}

allprojects { repositories { //加入下面这句 maven { url ‘http://maven.aliyun.com/nexus/content/groups/public/’ } maven { url ‘http://maven.aliyun.com/nexus/content/repositories/jcenter’ } maven { url ‘http://maven.aliyun.com/nexus/content/repositories/google’ } maven { url ‘http://maven.aliyun.com/nexus/content/repositories/gradle-plugin’ }

}

}

(无法下载)2.在相对应的库的网站找到jar文件,下载相应版本,粘贴到相应项目目录下

导入项目时候,SDK报错 可下载相应版本的SDK即可

最新回复(0)