skip to Main Content

I downloaded the Android Studio in my, but I run into an issue where it seems that the Android Studio setup is stuck on "starting download too long".

Screenshot

I tried reinstalling and try alternatives but it is not working…

2

Answers


  1. That will take time, let it run and it will complete the download and proceed in the installation process

    Login or Signup to reply.
  2. Android Studio is most likely downloading the components in the background. It should give you an indication that something is happening in order to give you a good user experience. Providing clear and timely (within 200ms) feedback to the user is a core principle of UX, so Android Studio is definitely flawed here.

    Troubleshooting Android Studio’s download process using strace:

    If you want to verify what Android Studio is doing in the background, you could use the tools available to you on Ubuntu or any other Linux distro, such as strace. Here’s what I did.

    First, find the process ID of the Android Studio process, like this:

    $ ps aux | grep android-studio
    foobaruser        8121 12.1  7.1 8288348 1168372 ?     Sl   11:50   3:59 /home/foobaruser/.apps/android-studio/jbr/bin/java -classpath /home/foobaruser/.apps/android-studio/lib/platform-loader.jar ...
    

    Note the process ID in this example is 8121. Next, use strace to get a real-time view of what syscalls the process and its threads are calling. We are interested in the write syscall, to find out if the process is writing a file anywhere:

    $ sudo strace -f -y -e write -p 8121
    strace: Process 11712 attached with 56 threads
    [pid 10225] write(220</home/foobaruser/Android/Sdk/.temp/PackageOperation01/x86_64-34_r13.zip.asdownload>, "350251l356G353n206373536434223753721534037304363377 302256D33035375310.321273"..., 8192) = 8192
    [pid 10225] write(220</home/foobaruser/Android/Sdk/.temp/PackageOperation01/x86_64-34_r13.zip.asdownload>, "20^Lp;A2053743573523023355357%372>20232275251=322uU2303673243]h303"..., 8192) = 8192
    [pid 10225] write(220</home/foobaruser/Android/Sdk/.temp/PackageOperation01/x86_64-34_r13.zip.asdownload>, "r372L[736136=2353263556102225b24535a1331Be36r31437!(252i"..., 8192) = 8192
    

    Press ctrlc to terminate the strace command. In this example, you can see that the Android Studio process is writing to a file named /home/foobaruser/Android/Sdk/.temp/PackageOperation01/x86_64-34_r13.zip.asdownload . You can get a real-time update on the size of this file by running this command:

    watch ls -lh /home/foobaruser/Android/Sdk/.temp/PackageOperation01/x86_64-34_r13.zip.asdownload
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search