AndroidStudio Gradle优化、Plugin优化


Gradle下载依赖速度优化:(阿里云镜像优化,通过修改项目的build.gradle下载源,使用国内阿里镜像来优化下载)

修改项目build.gradle

buildscript {

    repositories {

        //插入阿里云maven镜像

        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }

        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }

        maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }

        maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }

        google()

        jcenter()

    }

}

allprojects {

    repositories {

        //插入阿里云maven镜像

        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }

        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }

        maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }

        maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }

        google()

        jcenter()

    }

}

最终效果



JetBrains IDEA下载Plugin优化:(教育网开源镜像站,通过修改http代理,使用国内代理加速下载)

进入设置(File->Settings->Appearance & Behavior->System Settings->HTTP Proxy)

选中Auto-detect proxy settings

选中Automatic proxy configuration URL:

输入mirrors.neusoft.edu.cn:80

最终效果


最后要说的:

此教程只适合国内用户,海外用户是不需要这样操作的,如果你觉得本文写的不错,请给我点个赞。如果老板有钱,请给我点个赞赏。感谢点击本文

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容