问题存在原因:这是Android编译错误,jcenter里面的东西下载不了引起的。
问题解决:在项目的build.gradle文件中将jcenter()换成阿里的源,具体示例代码如下。修改之后再重新Sync Project即可。
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
// jcenter()
maven{ url'http://maven.aliyun.com/nexus/content/groups/public/' }
maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
// jcenter()
maven{ url'http://maven.aliyun.com/nexus/content/groups/public/' }
maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
}
}
————————————————
版权声明:本文为CSDN博主「Claire.Akman」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/lxy1740/java/article/details/104606385
网友评论