Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Gradle Fabric with proxy settings "Unable to connect to the network"

I have an Android project that uses the Crashlytics with Fabric plugin on the Android Studio , set up the proxy for the files :

studio64.exe.vmoptions :

-Dhttps.proxyPort=8080
-Dhttps.proxyHost=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Dhttps.proxyUser=xxxxx
-Dhttps.proxyPassword=xxxxxxxx

gradle.properties:

systemProp.http.proxyPassword=xxxxx
systemProp.http.proxyHost=proxy-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
systemProp.http.proxyUser=xxxxxxxx
systemProp.http.proxyPort=8080

systemProp.https.proxyPassword=xxxxx
systemProp.https.proxyHost=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
systemProp.https.proxyUser=xxxxxxxx
systemProp.https.proxyPort=8080

For some reason I can not log into the plug giving the message "Unable to connect to the network"

Anyone have any ideas or possible solution to this problem ?

like image 353
rodrigosimoesrosa Avatar asked Aug 07 '15 13:08

rodrigosimoesrosa


1 Answers

Navigate to

Android Studio directory > bin

Add below lines to studio.exe.vmoptions and studio64.exe.vmoptions

-Dhttps.proxyHost=PROXY_ADDRESS
-Dhttps.proxyPort=PROXY_PORT
-Dhttps.proxyUser=USER_NAME_HERE
-Dhttps.proxyPassword=PASSWORD_HERE

It is working perfectly fine with Android studio 2 Beta 5 for me .

UPDATED:

If you have any special characters in your username or password like "Domain/Userid" make sure you replace you your special characters with ASCII Encoding Reference here https://www.w3schools.com/tags/ref_urlencode.asp

like image 62
Piyush Agarwal Avatar answered Oct 24 '22 03:10

Piyush Agarwal