Android Studio 修改Gradle源

修改项目的 build.gradle 中的

allprojects{    repositories{        jcenter()    }}

allprojects{    repositories {        def REPOSITORY_URL = 'http://maven.aliyun.com/nexus/content/groups/public/'        all { ArtifactRepository repo ->            if(repo instanceof MavenArtifactRepository){                def url = repo.url.toString()                if (url.startsWith('https://repo1.maven.org/maven2') || url.startsWith('https://jcenter.bintray.com/')) {                    project.logger.lifecycle "Repository ${repo.url} replaced by $REPOSITORY_URL."                    remove repo                }            }        }        maven {            url REPOSITORY_URL        }    }}

更多相关文章

  1. eclipse 导出项目到 android studio .so 库
  2. android rdp 远程桌面项目
  3. Android开源项目:捕鱼达人游戏源代码
  4. 整理的一些免费的Android项目实战系列视频教程
  5. android 项目 访问webservice
  6. 【Android-Error】导入新项目报错 Error:Could not find bundlet
  7. [经典]Android开源项目分类汇总和Android 优秀开源项目实现原理

随机推荐

  1. 万能前端框架uni app初探01:搭建开发环境
  2. Android 在 Windows 上用 Nexus3 搭建 Ma
  3. Android使用recycleView组件
  4. Android中的上下文菜单Context Menu
  5. Android(安卓)即时通讯开发小结(一)
  6. Android 显示Intent和隐示Intent
  7. 在Android中利用SQLite实现对数据的增删
  8. Android Studio第4部分:调试工具和生产力
  9. android 系统调用大全
  10. dp能适配吗???