解决GitHub下载慢问题,不用修改HOSTS文件
https://blog.csdn.net/github_37847975/article/details/86477343
但是其实我没有成功, 最后是使用码云才下载成功
Android Studio 3.5更换gradle镜像源
很多人说更改app/build.gradle中的buildscript {repositories {}}
但根据我的实践证明在3.5之后应该更改根目录下的build.gradle而不是app目录下的build.gradle
--------------------------------------------------------------成品:-------------------------------------------------------------------------
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
//jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
//jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
--------------------------------------------------------------------------------------------------------------------------------------------
关键就在于修改repositories下的文件内容, 注释掉buildscript和allprojects里面repositories的jcenter()并且加上maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'} 就可以将镜像源换成阿里的,
Android出现:Your project path contains non-ASCII characters.
项目路径有中文名, 专业点, 用英文就不会报错了
Failed to find target with hash string 'android-25'
在
点击
中间那栏写着API Level, 如果缺25的就选Android 7.1.1(Nougat)
重新编译即可