文章目录一、建设maven本地仓库二、本地安装gradle库三、gradle配置AlibabaCloud (阿里巴巴云) maven镜像仓库地址四、error 3360 slperserse
一、建设maven当地仓库
浏览博客
登录maven官网,选择版本下载。 我在这里下载的是最新的3.6.3。
下载并解压缩到目录中,在同级目录下创建repository目录。
然后,通过修改maven conf目录下的settings.xml文件,找到localRepository,复制整行,并将其中的路径更改为刚才新创建的repository目录的路径
设置环境变量
验证命令行是否已成功设置
二、本地安装gradle库参考博客
下载到:
https://gradle.org/releases/
binary-only
也可以点击我的下载链接
设置环境变量
命令行验证
打开Android Studio,设置gradle路径,然后单击OK
三、Gradle配置Alibaba云Maven镜像仓库地址参考博客
配置Alibaba云仓库
在自己的本地仓库路径下创建init.gradle文件,然后写入
all项目{ repositories } def repository _ URL=' http://maven.a liyun.com/nexus/content/groups/public/' all { artifactrepositoryrepo-if (repoinstanceofmavenartifactrepository ) { def URL=repo.URL.tostring } if (URL.urrl ) URL.starts with (https://j center.bin tray.com/' ) { project.logger.life cycle ' repository $ { repo } replaced by $ repopor
Gradle配置本地路径distribution base=grad le _ user _ homedistributionpath=wrapper/distszipstorebase=grad le _ u u u u u u u homezer _ homezzer services.grad le.org/distributions/grad le-4.1-all.zipdistributionurl=file
buildscript { repositories } Google (maven ) URL ' http://maven.a liyun.com/nexus/content/groups/public/' } ma verr dependencies { class path ' com.Android.tools.build 3360 grad le 360 they belong//intheindividualmodulebuild.gradlefiles } maven { URL ' 3358 maver content/groups/public/' } maven central (maven ) URL'https://maven.google.com) jcenter (谷歌