rapt-pygame-example icon indicating copy to clipboard operation
rapt-pygame-example copied to clipboard

Unable to download the Android SDK

Open shivamshekhar opened this issue 7 years ago • 3 comments

I get the following error while running python android.py installsdk

shivam@shivam-Inspiron-3542 ~/Documents/My Projects/Python/pygame/rapt $ python android.py installsdk

I'm compiling a short test program, to see if you have a working JDK
on your system.


The JDK is present and working. Good!


I'm downloading Apache Ant. This might take a while.


I'm extracting Apache Ant.


I've finished unpacking Apache Ant.


Opening http://developer.android.com/sdk/terms.html in a web browser.


Do you accept the Android SDK Terms and Conditions?
yes/no> yes

I'm downloading the Android SDK. This might take a while.

Traceback (most recent call last):
  File "android.py", line 69, in <module>
    main()
  File "android.py", line 40, in main
    install_sdk.install_sdk(iface)
  File "buildlib/rapt/install_sdk.py", line 241, in install_sdk
    unpack_sdk(interface)
  File "buildlib/rapt/install_sdk.py", line 101, in unpack_sdk
    interface.download(url, plat.path(archive, replace=False))
  File "buildlib/rapt/interface.py", line 245, in download
    urllib.urlretrieve(url, dest)
  File "/usr/lib/python2.7/urllib.py", line 98, in urlretrieve
    return opener.retrieve(url, filename, reporthook, data)
  File "/usr/lib/python2.7/urllib.py", line 289, in retrieve
    "of %i bytes" % (read, size), result)
urllib.ContentTooShortError: retrieval incomplete: got only 312598 out of 326412652 bytes

shivamshekhar avatar Dec 30 '16 10:12 shivamshekhar

This code is well-tested at this point. I'd check out why you can't download the android SDK.

renpytom avatar Dec 30 '16 15:12 renpytom

Also, please add support for installing the sdk over proxified networks. Or, is there a way I can add my username, password, host and port settings?

shivamshekhar avatar Dec 30 '16 17:12 shivamshekhar

You should be able to set the http_proxy environment variable, something like:

http_proxy=http://myproxy:1234

renpytom avatar Dec 30 '16 23:12 renpytom