Error when run Android studio IDE
Solution 1
Configure a proxy for Android studio by modifying other.xml file at:
C:\Users\"Your account"\.AndroidStudio\config\options\other.xml
Then change the proxy configurations as follows:
<option name="USE_HTTP_PROXY" value="true" />
<option name="USE_PROXY_PAC" value="false" />
<option name="PROXY_HOST" value="your_proxy_server" />
<option name="PROXY_PORT" value="your_proxy_port" />
Solution 2
code.google.com/p/android/issues/detail?id=82789
download build-tools21.1.1 google link or dehkadeco.ir link
sdk will be located under C:\Users\<>\AppData\Local\Android\sdk.
You may find that 21.1.2 is already in place C:\Users\<>\AppData\Local\Android\sdk\build-tools Create a folder with name "21.1.1" under this.
Copy all the files from the downloaded build-tools:21.1.1 under android-5.0 to C:\Users\<>\AppData\Local\Android\sdk\build-tools\21.1.1
Start the Android studio now.
Solution 3
Try to rename folder 21.1.2
inside Android SDK build-tools
folder (in my case it was c:\Users\prokofyev\AppData\Local\Android\sdk\build-tools\21.1.2
) to android-5.0
(in my case it became c:\Users\prokofyev\AppData\Local\Android\sdk\build-tools\android-5.0
). This way I fixed similar error on new Android Studio installation.
Solution 4
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
Solution 5
I had the same problem, But when I opened the studio "as administrator" error has gone!!! And my problem solved!!!! In my case I have installed the sdk in different location since I don't want install anything on my user folder.
There is one more thing I have done that is I made the folder as writable from read access. (But I don't think this step is necessary)
Farshid Shekari
#Open_to_work Feel free to drop me a message on Linkedin.
Updated on July 11, 2020Comments
-
Farshid Shekari almost 4 years
When I launch Android studio I encounter this Error:
The following SDK components were not installed: build-tools-21.1.1, source-21, sys-img-x86-addon-google_apis-google-21, extra-android-m2repository, android-21, extra-google-m2repository, addon-google_apis-google-21, tools, platform-tools
And when I click retry, it gives me the same error:
-
M D over 9 yearsExecute your
AndroidStudio.exe
asRun as Admin
-
Farshid Shekari over 9 yearsGives again same error
-
dragi over 9 yearsHave you downloaded a full SDK?
-
Farshid Shekari over 9 yearsYes, I had download android studio with SDK!
-
Farshid Shekari over 9 yearsI download full sdk pack from this site and again download android studio without sdk and when install this version of android studio I set sdk path it and run it but when run emulator is very slow and I can't install api24 when I want install it occur error! I download sdk package from goo.gl/HpHozj . You can view details in image in that page.
-
Ali Rasoulian over 9 yearsHi @Farshid, Did you find a solution for this problem finally?
-
Muhammad Babar about 9 yearsThe team working on Android Studio are busy enjoying Free Snacks.
-
nagarajan about 9 yearsIts worked for me as M D said, run as admin.
-
Dheeraj Vepakomma almost 9 yearspossible duplicate of Android Studio doesn't start, fails saying components not installed
-
-
Farshid Shekari over 9 yearsI can't understand your answer
-
M.K over 9 yearsThe following SDK components were not installed: build-tools-21.1.1.this error means you don't download sdk commponents. So at the first you must download build-tools:21.1.1 package from dl-ssl.google.com/android/repository/…. and goto sdk path and goto build-tools folder and unzip your package into build-tools-21.1.1 folder.
-
Farshid Shekari over 9 yearsIf you look at to comments under question, I tested this way before but not worked!
-
rsano over 9 yearsOh, I'm sorry if I didn't read it. It might help those who are having the same error though. Anyway, it's been two weeks and you haven't solved it yet? Have you tried a clean installation?
-
Farshid Shekari over 9 yearsI download sdk package from this site(ehsanavr.com) and I download a android studio without sdk and then I installed and now that's work but that's speed is slow!
-
Charles Clayton over 9 yearsFirst I had to do what Erfan Jazeb Nikboo suggested, then I think I had the same problem as you. In the application I was told that it couldn't download build-tools 21.1.1, but inside build-tools I had folder 21.1.2. I downloaded 21.1.1 from here: downloads.puresoftware.org/files/android/build-tools and put it in build-tools with and named the folder 21.1.1 and that solved my problems.
-
Charles Clayton over 9 yearsThis solved the first part of my problem which was that it couldn't install
tools and extra-android m2repository
, then after that I had the same error but forbuild-tools-21.1.1
which I solved using Alexander Prokofyev's solution. -
Charles Clayton over 9 yearsI had this problem too and solved it this way, but I had to use Erfan Jazeb Nikoo's method first for the first set of problems. Then I got different errors and solved it this way.
-
Triynko about 9 yearsTo clarify, when you download the build-tools-21.1.1.zip file, it actually contains a folder named "android-5.0", rather than "21.1.1" as you might expect. I downloaded that, extracted it to the build-tools directory (so now I had both a "21.1.2" and a "android-5.0" directory, I hit "retry" on the error message and it succeeded. Although it finished with a new error "Unable to create a virtual device: Unable to create Android virtual device".
-
Abdul Rauf about 9 yearsit worked for me. Thanks :) I think android studio should ask for proxy settings at start if it is unable to connect to internet
-
lppier about 9 yearsThis worked for me. But then Google, shouldn't it just work? Even in offline mode...