In my Android studio when I want to sync online gradle with JCenter() in gradle it wont sync and failed that you are behind proxy !! and I never use proxy but if I use maven { url 'http://repo1.maven.org/maven2'} instead of JCenter() in gradle file it will sync . I dont know why ?!! what should I do to sync with Jcenter()
Asked
Active
Viewed 236 times
0
-
provide you gradle file code too – RATHI Jun 22 '16 at 14:04
-
i mean the code that you have written in your gradle working and non-working one. – RATHI Jun 22 '16 at 14:07
-
I dont use specefic code in gradle.when I build new android project in android studio the defualt gradle has Jcenter – mozhi jafr Jun 22 '16 at 14:07
-
which gradle version and which android studio? – RATHI Jun 22 '16 at 14:14
-
android studio 2.1.1 gradle 2.10 in setting but in classpath 2.1.0 – mozhi jafr Jun 22 '16 at 14:19
-
so what should I do? – mozhi jafr Jun 22 '16 at 14:23
-
i am assuming that you are not setting proxy setting in gradle-wrapper. – RATHI Jun 22 '16 at 14:25
-
set Use default gradle wrapper in preferences and edit Project\gradle\wrapper\gradle-wrapper.properties files field distributionUrl like this distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip – RATHI Jun 22 '16 at 14:26
-
check this: http://stackoverflow.com/questions/24852219/android-buildscript-repositories-jcenter-vs-mavencentral – RATHI Jun 22 '16 at 14:27
-
thanks alot I will check that – mozhi jafr Jun 22 '16 at 16:06
-
I did what you said but when I set default gradle wrapper and I sync gradle it automatically change to local gradle – mozhi jafr Jun 25 '16 at 11:12