Jcenter下载jar包慢##
网上看到一个解决方法:http://blog.csdn.net/linglingchenchen/article/details/62236723
按这里面讲的用阿里源的方法试了一下,似乎有效,后面遇到了再验证一下。
一直显示Refresh的问题
网上有分析说是在下载gradle文件,一种解决方法就是自己手工下载了放到对应目录下,上次有个项目用这个方法解决了问题。 但是今天这个项目还是遇到一直refresh的问题,界面显示是在“Resolve Dependence”,google一把,找到一个方法:(https://stackoverflow.com/questions/36529301/android-build-gradle-is-too-slow-dependency-resolution)见5楼。
he problem is gradlecan not connect to center repository in some country. When you create a new project or import , your center repository is jcenter() by default and whenever you want to build or sync or add new external dependency, gradle is going to connect to https://bintray.com/ but it can not and the building process is going to wait till connect to jcenter(), so this process might take long time ( +30 min ) , even you can not add new dependency .
解决方法就是
Final step and most important one is change your jcenter() to mavenCentral()
尝试了一下,果然有效果。所以在想,以后的项目,是不是都不要用jcenter了,还需要进一步验证。