I want to install the latest build tools using android package. On attempting to list the Android SDK packages:
$ android list sdk
Refresh Sources:
Fetching https://dl.google.com/android/repository/addons_list-2.xml
Failed to fetch URL https://dl.google.com/android/repository/addons_list-2.xml, reason: File not found
Fetched Add-ons List successfully
Refresh Sources
Fetching URL: https://dl.google.com/android/repository/repository-11.xml
Failed to fetch URL https://dl.google.com/android/repository/repository-11.xml, reason: File not found
Refresh Sources:
Fetching URL: https://dl.google.com/android/repository/repository-11.xml
Failed to fetch URL https://dl.google.com/android/repository/repository-11.xml, reason: File not found
Refresh Sources:
Fetching URL: https://dl.google.com/android/repository/repository-11.xml
Failed to fetch URL https://dl.google.com/android/repository/repository-11.xml, reason: File not found
Packages available for installation or update: 0
It seems that I need to update the sources. How can I do that?
Related
I use a pool of Linux agents to build my app. Every now and then an agent causes a build failure with the error:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':ComponentThatReqBuildToolsRev23.0.3:preBuild'.
> failed to find Build Tools revision 23.0.3
Because my build agents are remote (android is pre-installed /opt/android-sdk-linux/tools/android), I cannot preinstall the platform tools, build tools etc so have have a makefile included with my project. After checking out the code, it calls a method in the makefile:
#!/bin/bash
git submodule init
git submodule update
make updateSDK
# EOF
The method in the makefile is:
PACKAGES = "tools,platform-tools,build-tools-21.1.2,android-22,build-tools-23.0.3,android-21,extra-android-support,extra-android-m2repository,extra-google-m2repository,extra-google,google_play_services"
updateSDK:
(sleep 5 && while [ 1 ]; do sleep 1; echo y; done) \
| android --clear-cache update sdk --no-ui --all \
--filter $(PACKAGES)
In successful cases, the log from Bamboo shows:
Refresh Sources:
Fetching https://dl.google.com/android/repository/addons_list-2.xml
Validate XML
Parse XML
Fetched Add-ons List successfully
Refresh Sources
Fetching URL: https://dl.google.com/android/repository/repository-11.xml
Validate XML: https://dl.google.com/android/repository/repository-11.xml
Parse XML: https://dl.google.com/android/repository/repository-11.xml
Fetching URL: https://dl.google.com/android/repository/addon.xml
Validate XML: https://dl.google.com/android/repository/addon.xml
Parse XML: https://dl.google.com/android/repository/addon.xml
Fetching URL: https://dl.google.com/android/repository/glass/addon.xml
Validate XML: https://dl.google.com/android/repository/glass/addon.xml
Parse XML: https://dl.google.com/android/repository/glass/addon.xml
Fetching URL: https://dl.google.com/android/repository/extras/intel/addon.xml
Validate XML: https://dl.google.com/android/repository/extras/intel/addon.xml
Parse XML: https://dl.google.com/android/repository/extras/intel/addon.xml
Fetching URL: https://dl.google.com/android/repository/sys-img/android/sys-img.xml
Validate XML: https://dl.google.com/android/repository/sys-img/android/sys-img.xml
Parse XML: https://dl.google.com/android/repository/sys-img/android/sys-img.xml
Fetching URL: https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml
Validate XML: https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml
Parse XML: https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml
\Fetching URL: https://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml
Validate XML: https://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml
Parse XML: https://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml
Fetching URL: https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml
Validate XML: https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml
Parse XML: https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml
Fetching URL: https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml
Validate XML: https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml
Parse XML: https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml
License id: android-sdk-license-c81a61d9
Used by:
- Android SDK Tools, revision 25.1.3
- Android SDK Platform-tools, revision 23.1
- Android SDK Build-tools, revision 23.0.3
- Android SDK Build-tools, revision 21.1.2
- SDK Platform Android 5.1.1, API 22, revision 2
- SDK Platform Android 5.0.1, API 21, revision 2
- Android Support Repository, revision 30
- Android Support Library, revision 23.2.1 (Obsolete)
- Google Play services, revision 29
- Google Repository, revision 25
...
Do you accept the license 'android-sdk-license-c81a61d9' [y/n]:
y'. (There's a few of these)
Lots of lines of install code....
Finished task 'Update Android SDK' with result: Success
But every now and then, it connects to the wrong repository, either:
Fetching URL: https://dl.google.com/android/repository/repository-8.xml
or
Fetching URL: https://dl.google.com/android/repository/repository-10.xml
It's identical to the above log except for the url. It gives this error:
Error: Ignoring unknown package filter 'build-tools-23.0.3'
In these cases, the xml file does not contain build tools 23.0.3, i.e. this bit:
<sdk:archive>
<!--Built on: Tue Mar 15 17:38:51 2016.-->
<sdk:size>40733174</sdk:size>
<sdk:checksum type="sha1">368f2600feac7e9b511b82f53d1f2240ae4a91a3</sdk:checksum>
<sdk:url>build-tools_r23.0.3-linux.zip</sdk:url>
<sdk:host-os>linux</sdk:host-os>
</sdk:archive><sdk:archive>
<!--Built on: Tue Mar 15 17:38:50 2016.-->
<sdk:size>39679533</sdk:size>
<sdk:checksum type="sha1">fbc98cd303fd15a31d472de6c03bd707829f00b0</sdk:checksum>
<sdk:url>build-tools_r23.0.3-macosx.zip</sdk:url>
<sdk:host-os>macosx</sdk:host-os></sdk:archive>
<sdk:archive>
<!--Built on: Tue Mar 15 17:38:48 2016.-->
<sdk:size>39869945</sdk:size>
<sdk:checksum type="sha1">c6d8266c6a3243c8f1e41b786c0e3cee4c781263</sdk:checksum>
<sdk:url>build-tools_r23.0.3-windows.zip</sdk:url>
<sdk:host-os>windows</sdk:host-os>
</sdk:archive>
I've tried clearing the cache on the agent pre-build, I've tried listing the tools each time, used http and https and to no avail.
Basically my question is, where does the android update sdk command get the repository-XX.xml url from? Can you force this to the latest version?
I did run the below command according to the SDK Readme.txt placed inside the SDK:
$tools/android update sdk --no-ui
but I get the below errors :
Refresh Sources:
Fetching https://dl.google.com/android/repository/addons_list-2.xml
Failed to fetch URL https://dl.google.com/android/repository/addons_list-2.xml, reason: Unknown Host dl.google.com
Fetched Add-ons List successfully
Refresh Sources
Fetching URL: https://dl.google.com/android/repository/repository-10.xml
Failed to fetch URL https://dl.google.com/android/repository/repository-10.xml, reason: IO Unknown Host dl.google.com
Refresh Sources:
Fetching URL: https://dl.google.com/android/repository/repository-10.xml
Failed to fetch URL https://dl.google.com/android/repository/repository-10.xml, reason: IO Unknown Host dl.google.com
Refresh Sources:
Fetching URL: https://dl.google.com/android/repository/repository-10.xml
Failed to fetch URL https://dl.google.com/android/repository/repository-10.xml, reason: IO Unknown Host dl.google.com
Refresh Sources:
Fetching URL: https://dl.google.com/android/repository/repository-10.xml
Failed to fetch URL https://dl.google.com/android/repository/repository-10.xml, reason: IO Unknown Host dl.google.com
If I try to do the same using Android-Studio->SDK Manager I get the same error in the message Box.
Is this due to the no proxy settings?
It does sound like a proxy or other networking issue. Try pinging that address with ping dl.google.com . You should get back something like:
PING dl.l.google.com (216.58.219.110) 56(84) bytes of data.
64 bytes from mia07s25-in-f14.1e100.net (216.58.219.110): icmp_req=1 ttl=47 time=35.2 ms
64 bytes from mia07s25-in-f14.1e100.net (216.58.219.110): icmp_req=2 ttl=47 time=29.2 ms
until you cancel the command with Control-C.
While starting on eclipse I am getting below message:
Android SDK ping has encountered a problem,
ping usageServer failed
OnClick on details:
pingUsageServer failed
Bad version: 22.0.5
I know this question is already posted, but I didn't find any relevant solution for this. I am using windows 8.
While running the SDK:
////////////////////////////////////////////
Fetching http://dl-ssl.google.com/android/repository/addons_list-2.xml
Fetched Add-ons List successfully
Fetching URL: http://dl-ssl.google.com/android/repository/repository-8.xml
Validate XML: http://dl-ssl.google.com/android/repository/repository.xml
XML verification failed for http://dl-ssl.google.com/android/repository/repository.xml.
Line -१:-१, Error: org.xml.sax.SAXParseException; schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .
Done loading packages.
Fetching http://dl-ssl.google.com/android/repository/addons_list-2.xml
Fetched Add-ons List successfully
Fetching URL: http://dl-ssl.google.com/android/repository/repository-8.xml
Validate XML: http://dl-ssl.google.com/android/repository/repository.xml
XML verification failed for http://dl-ssl.google.com/android/repository/repository.xml.
Line -१:-१, Error: org.xml.sax.SAXParseException; schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .
Done loading packages.
Finally I solved the issue by updating hosts file.C:\Windows\System32\Drivers\etc, in last line I updated 74.125.237.1 dl-ssl.google.com, and second thing I change the windows language Hindi to english.
It's mainly because when you have other languages installed in parallel to English.
For correcting this issue go to: control panel > language > Advance Settings. Set Override for Windows display language to English. Do the same for Override for default input method and then restart Eclipse.
I have two problems with android SDK.The first is that after installing sdk manager I can not install new plateform,tools,sysimage etc online it gives following error:
Fetching
Validate XML
XML verification failed for .
Line -१:-१, Error: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <>.
Fetched Add-ons List successfully
Fetching URL:
Validate XML:
XML verification failed for .
Line -१:-१, Error: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <>.
Fetching URL:
Validate XML:
Failed to fetch URL , reason: addon.xml
Done loading packages.
I tried force https.
http in place of https.
I am using DSL for internet and not using any proxy to connect to internet.
For the sake of removing this problem I also tried proxy server but all in vain.
So I installed all the updates offline APD v2 helped me with downloading.
I used both Eclipse and Netbeans for dev.Everything worked fine,until I tried to run a new project and even sample project.
On Eclipse it gave me following error:
Same problem was with netbeans:
Creating redLight-debug-unaligned.apk and signing it with a debug key...
D:\Android\android-sdk\tools\ant\build.: The following error occurred while executing this line:
D:\Android\android-sdk\tools\ant\build.: The following error occurred while executing this line:
D:\Android\android-sdk\tools\ant\build.:
com.android.sdklib.build.ApkCreationException: java.lang.ArrayIndexOutOfBoundsException: 13
I am new in android app development and trying to rebuild my Java Application for android platform,but I am stuck in first step.
Please help me here.
Solution for your first problem is simple : Line -१:-१, it shows u r language for windows os is set to hindi (IN_HI).
Goto Control panel region & language option change language to English for all formats.
Restart machine & fetch xml.
I am also facing second problem solution to that is not yet found
check this: https://groups.google.com/forum/?fromgroups#!topic/android-developers/BvO5g6RMamo
Also I have updated bug in Android issues :
http://code.google.com/p/android/issues/detail?id=28824
I'm trying to install the SDK but when downloading the repositories I keep getting the error
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml,
reason: Invalid argument: connect".
And the green download bar doesn't move. Does anyone know how to deal with this?