I was installing Android Studio on my Ubuntu 16.04.4 LTS. I successfully downloaded it and I can run with ./studio.sh from /opt/android-studio/bin. After executing this command, it starts downloading some components but after some time, its fails and gives the following log:
Android SDK Build-Tools 27.0.3 and 3 more SDK components were not installed
java.io.IOException: Cannot download
'https://dl.google.com/android/repository/
android_m2repository_r47.zip':
Read timed out
, response: 200 OK
Warning: An error occurred while preparing SDK
package Android Support Repository: Cannot
download 'https://dl.google.com/android/repository/
android_m2repository_r47.zip':
Read timed out
, response: 200 OK.
java.io.IOException: Cannot download
'https://dl.google.com/android/repository/
build-tools_r27.0.3-linux.zip':
Read timed out
, response: 200 OK
Warning: An error occurred while preparing SDK
package Android SDK Build-Tools 27.0.3: Cannot
download 'https://dl.google.com/android/repository/
build-tools_r27.0.3-linux.zip':
Read timed out
, response: 200 OK.
java.io.IOException: Cannot download
'https://dl.google.com/android/repository/
google_m2repository_gms_v11_3_rc05_wear_2_0_5.zip':
Read timed out
, response: 200 OK
Warning: An error occurred while preparing SDK
package Google Repository: Cannot download
'https://dl.google.com/android/repository/
google_m2repository_gms_v11_3_rc05_wear_2_0_5.zip':
Read timed out
, response: 200 OK.
java.io.IOException: Cannot download
'https://dl.google.com/android/repository/
sources-27_r01.zip':
Read timed out
, response: 200 OK
Warning: An error occurred while preparing SDK
package Sources for Android 27: Cannot download
'https://dl.google.com/android/repository/
sources-27_r01.zip':
Read timed out
, response: 200 OK.
java.io.IOException: Cannot download
'https://dl.google.com/android/repository/
platform-27_r01.zip':
Read timed out
, response: 200 OK
Warning: An error occurred while preparing SDK
package Android SDK Platform 27: Cannot download
'https://dl.google.com/android/repository/
platform-27_r01.zip':
Read timed out
, response: 200 OK.
So what's the solution?
Even if I download these .zip files externally, what are their respective locations where I can extract them to make the studio working?