What is it? And what does it do?

Gradle sync is a gradle task that looks through all of your dependencies listed in your build.gradle files and tries to download the specified version.

Why does it needs internet connection? What ports does it use?

It requires an internet connection because it is usually downloading these dependencies from a remote location. You can define what ports it uses by changing your gradle.properties. (see below)

I'm working on an enterprise that has a proxy, and it fails trying to connect to somewhere.

Your work proxy may be blocking this and you'll need to add your proxy configuration to solve your issues.

Go into:

and update your proxy configuration url to your work proxy. (automatic or manual depending on your setup).

NOTE: If you are using the command line to run your gradle build, you will probably need to update the proxy settings via your gradle.properties file.

Global Properties File Location : ~/.gradle/gradle.properties (or use your local project file if you have one)

Add proxy settings to this file:

HTTPS

HTTP


If you absolutely cannot get an internet connection via gradle you'll need to download the dependencies another way and reference them locally on your computer or local network.

https://stackoverflow.com/questions/43636707/what-is-gradle-sync-in-android-studio?answertab=votes#tab-top

What is gradle sync in Android Studio?的更多相关文章

  1. Introducing Gradle (Ep 2, Android Studio)

    https://www.youtube.com/watch?v=cD7NPxuuXYY    Introducing Gradle (Ep 2, Android Studio) https://www ...

  2. 关于Eclipse如何加入Gradle文件与Android Studio两个平台一起开发,工作目录不发生变化

    前言: 本来很久之前想弄这玩意,不过因为各种原因,所以没弄. 今天有位前辈提出需求.说想让Eclipse的Android项目逐步走向Android Studio,但是又担心Android Studio ...

  3. Unity导出Gradle工程给Android Studio使用

    1 Unity导出Gradle项目 Unity打包时Build System选择Gradle,勾选Export Project 2 Android Studio导入Unity导出的Gradle项目 打 ...

  4. Eclipse 项目以非gradle方式导入Android Studio

    对于以前习惯了Eclipse ide的开发这来说,要把项目导入到studio是一件很不愿接受的事情,但是...毕竟人家官方都给出建议了,并且年后会逐渐被淘汰 如下图所示是一个典型的eclipse项目. ...

  5. could not find an installed version of gradle either in android studio

    问题描述: 很多人在Ionic升级到3之后,无缘无故发现,当我们添加android平台后,build或者run的时候,命令行窗口给我们提示: 如果在Ionic2时add的android platfor ...

  6. unity5.6 导出gradle工程,Android Studio 导入问题以及解决

    导入后gradle building 一直到跑,卡住了,一般是gradle没有下载,又下不下来的原因. 去  http://services.gradle.org/distributions/  下载 ...

  7. Android Studio Gradle编译项目报错

    Gradle project sync failed Android Studio每次更新版本都会更新Gradle这个插件,但由于长城的问题每次更新都是失败,又是停止在Refreshing Gradl ...

  8. [转]加速Android Studio/Gradle构建

    加速Android Studio/Gradle构建 android android studio gradle   已经使用Android Studio进行开发超过一年,随着项目的增大,依赖库的增多, ...

  9. 拥抱 Android Studio 之五:Gradle 插件开发

    实践出真知 笔者有位朋友,每次新学一门语言,都会用来写一个贪吃蛇游戏,以此来检验自己学习的成果.笔者也有类似体会.所谓纸上得来终觉浅,绝知此事要躬行.这一章,笔者将以开发和发布一个 Gradle 插件 ...

随机推荐

  1. Ubuntu 16.04安装Chrome浏览器

    一.先有一个hosts能访问Google 参考:http://www.cnblogs.com/EasonJim/p/5999060.html 二.安装方法有两种,如下所示: 1.下载deb包(推荐) ...

  2. 25、Java并发性和多线程-阻塞队列

    以下内容转自http://ifeve.com/blocking-queues/: 阻塞队列与普通队列的区别在于,当队列是空的时,从队列中获取元素的操作将会被阻塞,或者当队列是满时,往队列里添加元素的操 ...

  3. VS2017 +NetCore2.2.0+WebApi项目整合SwaggerUI 以及遇到的坑

    1.新建一个WebApi项目,这里不说了. 2.打开项目nuget管理控制台,在 https://www.nuget.org/ 搜索swagger的包:Swashbuckle.AspNetCore , ...

  4. 数据结构——算法之(027)( 在O(1)时间内删除链表结点)

    [申明:本文仅限于自我归纳总结和相互交流,有纰漏还望各位指出. 联系邮箱:Mr_chenping@163.com] 题目:在O(1)时间内删除链表结点.且不知道链表头 题目分析: 1.把要删除节点的下 ...

  5. 京东电商API

    大家好~~2016年了~转眼过去三年了...一年没有更新博客了.. ..在上一年里,遇到了几个好哥们,一起写程序一起装逼,以下给大家讲述一下工作上遇到的技术问题,由于这个我開始弄的时候也比較麻烦,不知 ...

  6. 【详细】【转】C#中理解委托和事件 事件的本质其实就是委托 RabbitMQ英汉互翼(一),RabbitMQ, RabbitMQ教程, RabbitMQ入门

    [详细][转]C#中理解委托和事件   文章是很基础,但很实用,看了这篇文章,让我一下回到了2016年刚刚学委托的时候,故转之! 1.委托 委托类似于C++中的函数指针(一个指向内存位置的指针).委托 ...

  7. Java中四大代码块的运行顺序(附code)

    验证证的方法是写code.例如以下: public class test { static class A { public static String name = "hello" ...

  8. Yii中使用RBAC全然指南

    本人小菜鸟一仅仅,为了自我学习和交流PHP(jquery,linux,lamp,shell,javascript,server)等一系列的知识,小菜鸟创建了一个群. 希望光临本博客的人能够进来交流. ...

  9. hdu 2094 产生冠军(拓扑排序)

    产生冠军 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submi ...

  10. DM8168 dead JTAG clock

    针对新板调试,不针对EVM板. TI XDS560连上DM8168 20pin仿真接口 launch 8168.ccxml,右击CortexA8,选择Connect Target 出现错误例如以下: ...