您当前的位置: 首页 >  maven

梁同学与Android

暂无认证

  • 4浏览

    0关注

    610博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Android --- Add Google Maven repository and sync project

梁同学与Android 发布时间:2020-10-09 08:26:56 ,浏览量:4

用Android studio导入一个项目时,可以会报 Add Google Maven repository and sync project 有可能的解决方法如下: 在项目的build.gradle中修改如下:

buildscript {
    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        //jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'

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

allprojects {
    repositories {
        google()
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        //jcenter()
    }
}
关注
打赏
1657180707
查看更多评论
立即登录/注册

微信扫码登录

0.0500s