How to set proxy for android sdk manager?
Solution 1
Command Line syntax to use proxy settings
sdkmanager --list --verbose --no_https --proxy=http --proxy_host=<proxy_host> --proxy_port=<proxy_port>
Solution 2
Installation of android SDK (on windows 7 with proxy authetication) Command Line syntax to use proxy settings.
-
Edit
%ANDROID_HOME%/tools/bin/sdkmanager.bat
.Add
-Dhttp.proxyUsername="MyUser" -Dhttp.proxyPassword="MyPass"
on"%JAVA_EXE%"
. I have something like this:@rem Execute sdkmanager "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %SDKMANAGER_OPTS% -Dhttp.proxyUsername="MyUser" -Dhttp.proxyPassword="MyPass" -classpath "%CLASSPATH%" com.android.sdklib.tool.sdkmanager.SdkManagerCli %CMD_LINE_ARGS%
Install your packages for the Android SDK, just add
--proxy=http --proxy_host=<proxy_host> --proxy_port=<proxy_port>
. I have something like this:
"%ANDROID_HOME%\tools\bin\sdkmanager" "emulator" "platform-tools" "platforms;android-25" "build-tools;27.0.3" "extras;android;m2repository" "extras;google;m2repository" --proxy=http --proxy_host=pftwbappp04-wcg.mycompany.com.pe --proxy_port=8080
Solution 3
Yes you can set it in settings
Goto
Settings->Appearance and Behaviour->System settings-> HTTP Proxy
Also note that some of Antivirus and Firewall may block your connection
Related videos on Youtube
![Himanshu Sarmah](https://lh3.googleusercontent.com/-tQQ2nDtP-LE/AAAAAAAAAAI/AAAAAAAAAZs/9ln3IA61GuM/photo.jpg?sz=256)
Himanshu Sarmah
Updated on July 09, 2022Comments
-
Himanshu Sarmah almost 2 years
I am behind a proxy and need to set up SDK manager for the android virtual device. But SDK manager is unable to download any os images/SDK updates from the add-on lists probably due to the proxy configuration. The solutions that I have already tried:
- Setting proxy port and host in android config file, or directly in SDK manager
- Creating a squid proxy server and make SDK manager connect to squid server
- Run android.bat as an administrator with proxy settings, username and password in command line
None of this worked and I still do not see the SDK updates or the OS images in the SDK manager. If anyone has some solutions for a similar problem, that would be great.
-
SHASHIDHAR MANCHUKONDA almost 7 yearsHow to send authentication to the proxy username and password?
-
Ananth Ramasamy Meenachi almost 7 yearsI don't see an argument to pass the proxy username & password. See if you get a prompt for user name & password while executing. Raise an issue in github project github.com/JakeWharton/sdk-manager-plugin/blob/master/src/main/…
-
SHASHIDHAR MANCHUKONDA almost 7 yearsthanks for you response it is not asking for authentication prompt
-
Daniel Delgado almost 6 yearsI also need to set authentication for my proxy