What is gradle sync in Android Studio?
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?的更多相关文章
- Introducing Gradle (Ep 2, Android Studio)
https://www.youtube.com/watch?v=cD7NPxuuXYY Introducing Gradle (Ep 2, Android Studio) https://www ...
- 关于Eclipse如何加入Gradle文件与Android Studio两个平台一起开发,工作目录不发生变化
前言: 本来很久之前想弄这玩意,不过因为各种原因,所以没弄. 今天有位前辈提出需求.说想让Eclipse的Android项目逐步走向Android Studio,但是又担心Android Studio ...
- Unity导出Gradle工程给Android Studio使用
1 Unity导出Gradle项目 Unity打包时Build System选择Gradle,勾选Export Project 2 Android Studio导入Unity导出的Gradle项目 打 ...
- Eclipse 项目以非gradle方式导入Android Studio
对于以前习惯了Eclipse ide的开发这来说,要把项目导入到studio是一件很不愿接受的事情,但是...毕竟人家官方都给出建议了,并且年后会逐渐被淘汰 如下图所示是一个典型的eclipse项目. ...
- could not find an installed version of gradle either in android studio
问题描述: 很多人在Ionic升级到3之后,无缘无故发现,当我们添加android平台后,build或者run的时候,命令行窗口给我们提示: 如果在Ionic2时add的android platfor ...
- unity5.6 导出gradle工程,Android Studio 导入问题以及解决
导入后gradle building 一直到跑,卡住了,一般是gradle没有下载,又下不下来的原因. 去 http://services.gradle.org/distributions/ 下载 ...
- Android Studio Gradle编译项目报错
Gradle project sync failed Android Studio每次更新版本都会更新Gradle这个插件,但由于长城的问题每次更新都是失败,又是停止在Refreshing Gradl ...
- [转]加速Android Studio/Gradle构建
加速Android Studio/Gradle构建 android android studio gradle 已经使用Android Studio进行开发超过一年,随着项目的增大,依赖库的增多, ...
- 拥抱 Android Studio 之五:Gradle 插件开发
实践出真知 笔者有位朋友,每次新学一门语言,都会用来写一个贪吃蛇游戏,以此来检验自己学习的成果.笔者也有类似体会.所谓纸上得来终觉浅,绝知此事要躬行.这一章,笔者将以开发和发布一个 Gradle 插件 ...
随机推荐
- MAPZONE GIS SDK接入Openlayers3之二——空间参考扩展
Openlayers默认了两种空间参考,一个是EPSG4326,一个是EPSG3857,其它的空间参考需要进行扩展才能使用.所以我们初始化时进行了如下操作: 1.将配置数据库中所有的空间参考读取出来, ...
- Vim tips——Working with external commands
A common sequence of events when editing files is to make a change and then need to test by executin ...
- [miniApp] WeChat user login code
in client/app.js, we put user login logic inside here, so that other module can reuse those code by ...
- 闲聊ROOT权限——ROOT权限的前世今生
近期工作一直非常忙.居然慢慢地疏远了CSDN的博客,然而在工作中遇到问题,又会被多次的引导至CSDN,故笔者抽出时间也将自己学习的成果与大家分享在这里,希望能帮助到须要帮助的人. 本文将从几个方面,由 ...
- 从头认识java-15.1 填充容器(1)-利用Collection构造器的方式
这一章节我们来介绍一下填充容器. 就像数组一样,Arrays.fill是填充方法,在容器里面也有. 1.Collections.nCopies 这种方法是生成某种类型多少个对象,然后我们能够把他放到容 ...
- Android系统编译时遇到的几个.mk的疑惑。
在Android4.2的源代码Build/prduct_config.mk里面遇到几个疑惑: # Convert a short name like "sooner" into t ...
- Solr基础教程之solrconfig.xml(三)
前面介绍过schema.xml的一些配置信息,本章介绍solrconfig.xml的配置,以及怎样安装smartcn分词器和IK分词器,并介绍主要的查询语法. 1. solr配置solrconfig. ...
- [LeedCode OJ]#63 Unique Paths II
[ 声明:版权全部,转载请标明出处,请勿用于商业用途. 联系信箱:libin493073668@sina.com] 题目链接:https://leetcode.com/problems/uniqu ...
- .NET平台下Redis使用(二)【StackExchange.Redis学习】
Program.cs内容: using Newtonsoft.Json; using StackExchange.Redis; using System; using System.Data; usi ...
- shell脚本-高级变量
shell脚本-高级变量 字符串变量切片 ${#var}: 返回字符串变量var的长度 ${var:offset}: 返回字符串变量var中从第offset个字符后(不包括第offset 个字符)的字 ...