联系QQ:884563046点击这里给我发消息

android studio提示 Add Google Maven repository and sync project Open File解决安案

1、androidstudio support包报错 add google maven respository and sync project

2、Add Google Maven repository and sync project Open File

在项目下的build.gradle文件下两个地方都加上google()

/ Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
google()//加上这行
//用这个替换jcenter(),避免长时间下载不成功jcenter()
maven{ url ‘http://maven.aliyun.com/nexus/content/groups/public/’}
// jcenter()
}
dependencies {
classpath ‘com.android.tools.build:gradle:3.2.1’

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()//加上这行
mavenLocal()
//用这个替换jcenter(),避免长时间下载不成功jcenter()
maven{ url ‘http://maven.aliyun.com/nexus/content/groups/public/’}
// jcenter()
}
}

 

微信(不常用)和QQ同号: 884563046点击这里给我发消息

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注