Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SDK Manager failed to parse xml

after several month when i tried to open Android SDK manager i realized it's not loading any of packages that i didn't install or have updates and just showing already installed packages (like there is not any internet connection), but there isn't any connection error shows in log like image bellow

log

i checked Official Add-on site list and it's Empty

add-on site

i checked sdkmanager.bat file in tools\bin path and i got this error that can't parse xml file

xml

note that i can access the xml file manually when enter it's path in browser.
is there anything i can do to fix this?

UPDATE

I figured out the reason of this problem and i added an answer for it.

like image 631
dev-masih Avatar asked Sep 07 '17 09:09

dev-masih


2 Answers

The standalone SDK Manager has been deprecated and the repository urls have changed. The updates are now available from within Android Studio so you need to update it.

like image 130
jL4 Avatar answered Oct 24 '22 06:10

jL4


Well the issue is that android sdk manager never checks if the downloaded page from request for getting xml files are correct or not so it couldn't detect my proxy automatically and gets some failed pages instead of correct xml files and parsing them results those errors. adding Http proxy and port in options simply resolve this issue. i hope android sdk checks the connection better so me and maybe others time will not waste in such these issues.

like image 25
dev-masih Avatar answered Oct 24 '22 08:10

dev-masih