问题
There is a common problem in using android sdk manager but there isn't any solution for this problem all over the web even in the stackoverflow:
for updating components of android sdk I write in the command prompt:
C:\sdk\tools\bin>sdkmanager --list
the erros that appear are these:
Warning: Errors during XML parse:
Warning: White spaces are required between publicId and systemId.
Warning: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 62; White spaces are required between publicId and systemId.
Warning: javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 62; White spaces are required between publicId and systemId.]
Warning: Additionally, the fallback loader failed to parse the XML.
Warning: White spaces are required between publicId and systemId.
Warning: Failed to parse source list at https://dl.google.com/android/repository/addons_list-3.xml
Please everyone who have experienced the same problem or everyone who know the solution, help this problem be solved.
回答1:
First of all, try to open https://dl.google.com/android/repository/repository2-1.xml url in your web browser. This url opens a page containing a very lengthy xml file. If the This product is not available in your country message from Google appeared, you must use a VPN. If you could open the above url after using VPN then do following.
In Android Studio (2.3.3) open Settings from File>Settings [Ctrl+Alt+S]
. In the left panel go to Appearance & Behavior>System Settings>HTTP Proxy
. Here select Auto-detect proxy settings radio button (No proxy is selected by default). Now (while your VPN is enabled) you should see new android SDK packages that are availaible for download (that weren't availaible before doing this step for me) in Appearance & Behavior>System Settings>Android SDK
.
来源:https://stackoverflow.com/questions/48645087/error-in-updating-android-sdk-org-xml-sax-saxparseexception