在Windows上使用sdkmanager安装android命令行工具 [英] installing android command line tools using sdkmanager on windows
问题描述
我正在尝试在Windows上使用sdkmanager安装android命令行工具,以便在SAP Web IDE中进行混合android应用程序开发.另外,我在代理服务器网络下,当我尝试通过命令使用cmd设置代理服务器时:
I am trying to install android command line tools using sdkmanager on windows for hybrid android app development in SAP web IDE. Also I am under a proxy network and when I try to set proxy using cmd by the command :
sdkmanager --list --verbose --no_https --proxy=http --proxy_host=10.60.11.11 --proxy_port=8080
它显示错误:
Info: Parsing C:\Users\10002001\Downloads\sdk-tools-windows-
3859397\tools\package.xml
Info: Parsing C:\Users\10002001\Downloads\sdk-tools-windows-
3859397\tools\package.xml
Info: Failed to validate the XML for the repository at URL
'http://dl.google.com
/android/repository/repository2-1.xml/repository-12.xml'
Warning: Errors during XML parse:
Warning: javax.xml.bind.UnmarshalException
- with linked exception:
[java.net.ConnectException: Connection refused: connect]
Warning: Additionally, the fallback loader failed to parse the XML.
Warning: Failed to parse source list at
https://dl.google.com/android/repository/addons_list-3.xml
Warning: File C:\Users\10002001\.android\repositories.cfg could not be
loaded.
Installed packages:
--------------------------------------
tools
Description: Android SDK Tools 26.0.1
Version: 26.0.1
Installed Location: C:\Users\10002001\Downloads\sdk-tools-windows-3859397\to
ols
done
当我给出此命令来安装平台工具时:
And when I give this command to install platform tools :
sdkmanager platform-tools
它给出以下结果:
Warning: java.net.ConnectException: Connection refused: connect
Warning: File C:\Users\10002001\.android\repositories.cfg could not be
loaded.
Warning: Failed to download any source lists!
Warning: Failed to find package platform-tools
请帮助!
推荐答案
对于sdkmanager,您应该始终使用代理开关.我还没有找到一种使其成为系统或用户设置的方法.
With sdkmanager you should always use proxy switches. I did not yet found a way to make it a system or user setting.
sdkmanager platform-tools --no_https --proxy=http --proxy_host=10.60.11.11 --proxy_port=8080
对于文件警告,只需在C:\Users\10002001\.android\repositories.cfg
For file warning simply create an empty file at C:\Users\10002001\.android\repositories.cfg
对于连接异常,请确保用户可以访问互联网,然后尝试在浏览器或wget/curl中打开链接https://dl.google.com/android/repository/addons_list-3.xml
.
For connection exception make sure the user has internet access and try opening the link https://dl.google.com/android/repository/addons_list-3.xml
in a browser or wget/curl.
这篇关于在Windows上使用sdkmanager安装android命令行工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!