我是靠谱客的博主 动听西牛,这篇文章主要介绍新装Android studio无法联网,总是报错Could not get resource 'https://jcenter.bintray.com,现在分享给大家,希望可以做个参考。
最近电脑重装系统了,下载了AS,新建工程却总是没办法同步成功,后面把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 { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven{ url 'http://maven.aliyun.com/nexus/content/repositories/central/'}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.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 { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven{ url 'http://maven.aliyun.com/nexus/content/repositories/central/'}
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
最后
以上就是动听西牛最近收集整理的关于新装Android studio无法联网,总是报错Could not get resource 'https://jcenter.bintray.com的全部内容,更多相关新装Android内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复