美文网首页
001 新建项目

001 新建项目

作者: 卫泽洪_70a7 | 来源:发表于2021-05-10 13:19 被阅读0次

    1、dl.google.com被国内qiang挡住,新建项目之后会有下面的提示窗口:


    image.png

    其实我不知道为什么会有这玩意,也不知道怎么配置,不管了,,以后再说。

    2、新建项目默认的gradle是从网上下载的,很慢,改成自己本地的:


    image.png

    3、修改gradle 仓库为阿里仓库
    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    buildscript {
    repositories {
    maven { url 'https://maven.aliyun.com/repository/google' }
    maven { url 'https://maven.aliyun.com/repository/jcenter' }
    maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
    maven { url 'https://maven.aliyun.com/nexus/content/repositories/releases/' }
    maven { url 'https://developer.huawei.com/repo/' }
    }
    dependencies {
    classpath "com.android.tools.build:gradle:4.1.3"

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

    }

    allprojects {
    repositories {
    maven { url 'https://maven.aliyun.com/repository/google' }
    maven { url 'https://maven.aliyun.com/repository/jcenter' }
    maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
    maven { url 'https://maven.aliyun.com/nexus/content/repositories/releases/' }
    maven { url 'https://developer.huawei.com/repo/' }
    }
    }

    task clean(type: Delete) {
    delete rootProject.buildDir
    }

    相关文章

      网友评论

          本文标题:001 新建项目

          本文链接:https://www.haomeiwen.com/subject/ccqnrltx.html