[android-studio] Android Studio doesn't start, fails saying components not installed

I have installed Latest version of Android studio from Google. After launching it, it tries to download some packages.

After a while it shows the following error.

The following SDK components were not installed: extra-android-m2repository, tools, addon-google_apis-google-21, android-21, sys-img-x86-addon-google_apis-google-21, source-21, extra-google-m2repository

I couldn't rectify the error, even though I pressed Retry multiple times.

Anyone can suggest solution!

This question is related to android-studio

The answer is


If are you using Linux, I noticed that the Android Studio cannot be run with JDK 8. You have to download open Jdk 7 and press alt + shift + t and type:

sudo apt-get install openjdk-7-jre 

When u have downloaded jdk 7 go to terminal then go to android-studio/bin then type

sudo sh ./studio.sh 

Update latest android sdk tools from sdk manager and removing proxy that I did input for connecting Android studio with vpn worked for me.


On Windows, solved by running this file which allowed me to update the SDK via GUI: C:\Users\%UserName%\AppData\Local\Android\sdk\tools\android.bat

Android started OK after the SDK update.

Note: running C:\Users\%UserName%\AppData\Local\Android\sdk\SDK Manager.exe did nothing on my system.


Finally I able resolve this issue.

Do not install Android SDK with studio package, unkcheck the option when asked.

Steps to resolve:

  • Download latest android sdk, so while runnning studio first time it has not to download any exta packages. Unpack at /yourAndroidSDKPath
  • Uncheck option, Android SDK, while installing studio.
  • Give the /yourAndroidSDKPath in studio installation when asked. It works for me.

I tried other solutions, run as Administrator and proxy setting but nothing worked.


I had been facing the similar problem in Windows 7 and got the below problems while running the android-studio shortcut from my start programs menu for the first time.

Screenshot_1

Solution : Run As Administrator

The problem was due to the write permission in Windows C: drive and the Access is Denied message is displayed. Running the program as administrator downloads all the necessary components and now I can start Android Studio IDE.

Android Studio - Setup Wizard Success as Administrator

Update:

These permission issues doesn't seem to exist in Android Studio latest versions(checked in 1.3.2 in Windows 10) and works without the "Run as administrator" commands. If you still have the problem with the old/latest versions then it might be your firewall and proxy issues. In that case check out the other answers.


"The following SDK components were not installed: sys-img-x86-addon-google_apis-google-22 and addon-google_apis-google-22".

I would suggest just close the window instead of clicking Finish and select not to run the setup wizard.


Android Studio was not able to connect to internet in my work PC due to Intranet Proxy/Firewall settings, changing the proxy settings didnt help me either.

Android studio was failing to run as it requires to install the above mentioned packages. As a work around I installed the packages from Android SDK Manager and it solved it.

You can find the SDK Manager under C:\Users\< UserName> \AppData\Local\Android\sdk\SDK Manager.exe In the GUI choose the following options whichever is relavant.

  • Tools->All Android SDK Build-tools and SDK Platform-tools under version 21.*
  • Everything under Android 5.0.1(API 21)
  • Everything under Extras

After installation is complete try launching the Android Studio


Click Show Details while the components are downloading, it will give you more information as to what is actually happening.

In my case, it was a permission issue. To solve, I just executed the script with sudo. (sudo ./studio.sh (which will solve permission issues in the case of Linux environments). If you are on Windows, run the installation method as Administrator. (If it's a batch file, use an Administrator command prompt, if it's an executable, run as Administrator, etc..)


In OSX , I solved this issue by :

Step 1:

Go to System Preferences > Network : Advanced

enter image description herebypass the dl-ssl.google.com

Step 2:

Go to Proxies and set bypass proxies as following :

enter image description here


I'm in India, and my connection was not working properly. (I have internet, but sometime I have blank page on chrome, and I need to refresh)

I tried several time to restart android studio (almost 15 times). And now it's working.

Maybe you have same problem.


I also had issues with OS X Yosemite on a fresh install of Android Studio.

My situation was that I was using a VPN. In the preferences, I ended up setting the HTTP Proxy setting to detect automatically after trying running it as sudo and setting a static proxy setting, but neither worked. I was able to download successfully after that. Hope this helps someone with a similar situation (VPN).

Android HTTP Proxy Settings


I have a proxy in my connection (university connection) and I solved the problem by using the SDK manager to download the SDK packages then I opened android studio and it worked seamlessly.


On OSX (Yosemite), I was having the same issue. After trying several of the other answers, I changed the install directory files to be owned by me:

cd /Applications/android-sdk-mac_x86

chown -R *

Where is my user account.

The problem I had with doing the root install is that some files were ending up in the root account home directory and others in mine once I started using Android Studio.


Please do not run Desktop Applications as root. This is a dangerous habit.

I was able to resolve this problem by closing the window with the (X) at the top right. It asked me whether to run the setup wizard the next time too, which you do not want. Then android studio started normally. After that start the android SDK manager and click install on the bottom right.

Hope it helps


I encountered the same problem attempting to setup Android Studio from work. Running as admin didn't solve my problem, and I don't have direct access to proxy / firewall settings. In the end I resolved the issue by using the Android SDK Manager and installing the proper packages. A few of the package names and error messages (from studio install failure) didn't match up directly but a quick Google search showed me the light.

Hope this helps!


  1. disable antivirus
  2. run as admin
  3. log out and start again

One possible solution is to open Android SDK Manager from

C:\Users\%user%\AppData\Local\Android\sdk

Check Android SDK build tool 21.1.1 download and install. Restart Android Studio


A possible solution would be to check your proxy settings; under Windows 7 you can find those settings in the other.xml file present under the path C:\Users\YourUsername\\.AndroidStudio\config\options.

Note that if you turn both options "USE_HTTP_PROXY" and "USE_PROXY_PAC" to true the error keep coming but a pop-up should come out noticing the problem of a double configuration and prompting a resolution with a input window for those settings.

UPDATE - Possible solution

I've just managed to complete the wizard at home, maybe the proxy is not the real problem (as the last comment of @meanderingmoose pointed out). It seems there is a problem with the default installer of Android Studio 1.0.0, the one that contain both the IDE and di SDK Tools: the default installation path for the android sdk tools ends with myInstallPath../sdk/android-sdk but the first run setting for the Android Studio points at ..myInstallPath../sdk. So here is what i did.

  • Cut & Paste the content of the android-sdk folder outside the folder, so the files are under ..myInstallPath../sdk/
  • Use SDK Manager from the new location to update everything (Use this instead of the automatic wizard, you can select which package you want or need and you get also the speed and estimate time for the download)
  • Run Android Studio (it should load and check that the SDK is up to date and start the creation of an AVD, after that the IDE will load completely)

UPDATE - Workaround for the "download interrupted: read timed out" problem

The firewall and the proxy prevented my SDK Manager to download some updates, so i've recovered the .xml url for these updates, searched for the .zip files i needed and directly downloaded them with the help of a download manager, then i've manually installed them in their relative folder under the sdk folder ..a bit tricky but worked for me. For example in the Addon_xml_file i've searched for the m2repository, found the entry and downloaded the archive with the link m2repository_r14_zip_file. You always find the files you need in the same base as the .xml file (take a look at the url i've posted for the example).


Windows: run as Administrator, Linux: sudo


In windows, I was able to get it working using the following steps:

1) Download build-tools-21.1.1 from the following link: http://dl-ssl.google.com/android/repository/build-tools_r21.1.1-windows.zip

2) In windows, the android sdk will be will be located in: C:\Users\ \AppData\Android\sdk (AppData folder will be hidden by default, you can make it visible in "Folder Options")

3) In this path - C:\Users\ \AppData\Android\sdk\build-tools, you'll already find a folder "21.1.2". In the same path, create a new folder and name it "21.1.1"

4) Unzip the package that you downloaded in step 1. Copy the contents of the folder "android-5.0" and paste it in the folder "21.1.1" that you created in step 3).

5) Run Android Studio


In OS X run as admin the first time by opening a new Terminal and run the commands:

cd /Applications/Android\ Studio.app/Contents/MacOS/

sudo ./studio


I used custom installation instead of standard and that solved the issue! (just select custom and you can then install everything like the standard)


A little late but I was having this problem too and running studio as root just created more problems (using OSX here).

I fixed it by manually installing what was failing to install using the Android SDK manager. Just run android sdk in a terminal (probably the same on Windows but don't quote me). Let it install all the updates it wants, then if you can't make it through the setup, manually find the packages that are failing to install and install them.

Got me through a very frustrating problem and back to work.....


This answer is for OSX

I needed to resolve two things to successfully install android studio:

  1. Ensure you aren't using proxy that is stopping you from accessing the android resources. If you are using a corporate proxy, ensure that you have the settings setup up in Android Studio > Preferences > Filter for Proxy. If you don't see the Licence Agreement (Agree/Disagree) then your connection is not reaching the google download servers
  2. Run rm -rf ~/.android. This was essential in getting this working for me. A previous install or something else had affected this download caches. Best to nuke it and start fresh.

For me, this issue was proxy related. In Mac osx, even while above error is displayed, there is menu bar for Android Studio at top. Select preferences Android Studio -> Preferences and change proxy as below and issue was resolved. There could be similar options in Windows/Linux to access preferences page while error is being displayed.

enter image description here


Instead of using standard installation for android studio,i use custom installation and it's worked for me!!.

enter image description here


For OSX (Mac)

I tried install as Administrator (sudo) but it's did not work


After that I solve the problem by this,

when setup, select custom setup instead of standard setup

then, it will solve this problem