how to use a proxy connection with android studio - android

I'm trying to run a "hello world" application in android studio. My connection is via proxy. When I try run the "hello world app", android studio show me the next error:
Error running Prueba: Gradle project sync failed. Please fix your project and try again.
If I configure in: "File/setting -> HTTP Proxy" and next put my proxy configuration, the error is the next:
Error:Could not GET 'http://jcenter.bintray.com/com/android/tools/build/gradle/0.12.2/gradle-0.12.2.pom'. Received status code 407 from server: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Enable Gradle 'offline mode' and sync project
How can I fix that error?

There error indicates that proxy authentication is needed. To authenticate to your proxy server go back to File->Setting->HTTP Proxy, check the box for Proxy authentication and enter your credentials there. Also, click the check connection button to test that your connection is successful.

In Android Studio 1.4 there are two places, the proxy must be configured: First in Android Studio like Mike described in his answer. And second in the external SDK Manager:
Android Studio | Tools | Android | SDK-Manager | Launch Standalone SDK Manager | Tools | Options
After setting the proxy in the SDK Manager, too, the issue was fixed.

Related

Android Studio not connecting to internet and get 403 response

When installing Android Studio the action Finding available SDK components seems failed and no SDK get installed.
Also tried to install SDK using Android commond line tools and when I try to get list of SDKs by using below command
sdkmanager --list --verbose I get 403 error for downloading below xml file
https://dl.google.com/android/repository/addons_list-1.xml,https://dl.google.com/android/repository/addons_list-2.xml,https://dl.google.com/android/repository/addons_list-3.xml
But when I try from browser I am able to download those files.I am using my office laptop and I have checked Automatically detect settings in LAN settings and even I tried with uncheck that option also ,still getting the same result.
When I try to connect the Office VPN and set the proxy then I am not able to download by browser also
I tried with change setting in "No Proxy", "Auto Detect" and "Http Proxy" options in android studio also still no luck
And when I start Android Studio it shows "Untrusted Server's certificate" for "*.google.com" and I click Accept to continue.
I am using Windows 10 and AdoptOpenJDK 11. How I can resolve this issue.
Thanks in advance

Gradle sync failed: Could not connect to server

In my android studio 3.0 i am continuously getting this error -
Cannot start internal HTTP server. Git integration, JavaScript debugger and LiveEdit may operate with errors. Please check your firewall settings and restart Android Studio.
after this my gradle sync also failed stating the error -
Gradle sync failed: Could not connect to server [a3ea2c7d-cc16-4af2-82a9-037277903c02 port:49555, addresses:[/127.0.0.1]]. Tried addresses: [/127.0.0.1].
One thing to note down that this gradle sync failed when it(gradle) is connecting to gradle daemon.
i have tried all the options from stack overflow like netsh winsock reset etc.
But nothing work for me.
Also to mention i do not use embedded JDK in AS. I have provided it my downloaded jdk8.
How to solve this problem.
Thanks in advance.
Make sure your machine is connected to the internet.
Check the link here: Configure Android Studio - Proxy
I personally recommend that you try disabling the proxy if it is enabled.
Go to Windows Firewall -> Inbound & Outbound Rules -> add java.exe from JDK path & studio.exe from Android Studio directory.

Android studio v. 3.0.1 Error:Already seen doctype

I only use Psiphon to connect to the Internet. Since I have updated android studio to version 3, I am facing the following gradle sync error:
Error: Already seen doctype.
When sync is starting, Android Studio shows the Proxy Settings. Check "Enable HTTPS Proxy" and set "Host name" and "Port name" similar to HTTP Proxy settings.
NOTE: 5100 is my own proxy port, use your proxy port number instead.
Don't forget to set proxy settings of Android Studio as following:
this error is for download Necessary files From Google Servers
use Right VPN Connection Such As Cisco Any Connect

Gradle Sync Connection Timeout

I often get the following error while trying to sync gradle
Error:Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in ide or gradle.
Sometimes that i don't get the error, gradle sync takes more than 1 hour
Try to open and check this url in your browser
Google DL and try downloading latest Gradle version from Gradle Site
If you aren't able to access and download the files the time consumption is because you might be getting 403. You might not be having download access on your machine.
Contact your network administrator and ask for access.
Configure your gradle.properties with below settings -
systemProp.http.proxyPassword=
systemProp.http.proxyHost=
systemProp.http.proxyPort=
systemProp.http.proxyUser=
systemProp.https.proxyPort=
systemProp.https.proxyUser=
systemProp.https.proxyHost=
systemProp.https.proxyPassword=
Or you can go to Settings -> HTTP Proxy -> Provide details.
Now go to SDK Manager -> Tools -> Options -> Set provided proxy server and port.
Rebuild your project, you would be prompted with proxy dialog -> Check https proxy and build.
EDIT 1
If above solution does not work. Go to settings -> Search Gradle -> Check offline mode under Global gradle settings.
I Just encounter the same issue in my office network.
By default the "HTTP Proxy" is set to "No Proxy" in Android Studio.
I fix this the problem by making "HTTP Proxy" to "Auto Detect".
If it was working fine earlier and stopped all of a sudden, try removing any recent dependency that you have added and sync again. If you can't recall then try running it in offline mode.

Installing Android plugin with Eclipse (Indigo SR 1)

Friends,
I am trying to install Android plugin with Eclipse(Version: Indigo Service Release 1) in my machine(Linux Ubuntu 64 bit). My network uses proxy authentication so I went to Eclipse->windows->preferences->General->Network connection->Entered my credentials(for http & https).
And to install android -- Eclipse->Help->Install new software->Added the URL(Andriod - http://dl-ssl.google.com/android/eclipse/) and then clicked next.But it said some more plugins are missing.So I tried to update the eclipse.But when I tried to update the eclipse through the following URL(Helios - http://download.eclipse.org/releases/helios) it gives the following exception :
HTTP Proxy Authentication Required: http://download.eclipse.org/releases/helios/content.xml
HTTP Proxy Authentication Required: http://download.eclipse.org/releases/helios/content.xml
Proxy auth required
Please help me with this..
FYI: I am entering the valid credentials,I can visit sites through that same credentials with my browser.
hmm
Eclipse->Help->Install new software->drop down to all available sites and select sdk install it and then move on to android http://dl-ssl.google.com/android/eclipse/

Categories

Resources