Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Setup: android-23 not installed

I have installed Android Studio (version 1.5.1, build 141.2456560) two times today, on two PC computers, and I have seen this error twice now. In other words, the same error appeared on both computers, both of which were running Windows 10 Pro (x64, version 1511, build 10586.164).

The following SDK component was not installed: android-23

error

What is the problem? How do I resolve this?

like image 353
Samir Avatar asked Mar 13 '16 12:03

Samir


Video Answer


1 Answers

This may be caused by a problem in the installation script for Android Studio. It may also be caused by the lack of administrator privileges.

Click to try again! This helped when I encountered this error.

The installation log may look something like this.

Android SDK was installed to C:\Users\Bob\AppData\Local\Android\sdk


Installing Archives:
  Preparing to install archives
  Installing SDK Platform Android 6.0, API 23, revision 2
  Failed to rename directory C:\Users\Bob\AppData\Local\Android\sdk\platforms\android-23 to C:\Users\Bob\AppData\Local\Android\sdk\temp\RemotePlatformPkgInfo.old01.

SDK Manager: failed to install
-= Warning ! =-
A folder failed to be moved. On Windows this typically means that a program is using that folder (for example Windows Explorer or your anti-virus software.)
Please momentarily deactivate your anti-virus software or close any running programs that may be accessing the directory 'C:\Users\Bob\AppData\Local\Android\sdk\platforms\android-23'.
When ready, press YES to try again.
Note: you  can use --force to override to yes.
[y/n] =>
  Installing Android SDK Build-tools, revision 23.0.2
    Installed Android SDK Build-tools, revision 23.0.2
  Installing Local Maven repository for Support Libraries, revision 28
    Installed Local Maven repository for Support Libraries, revision 28
  Installing Google Repository, revision 24
    Installed Google Repository, revision 24
  Installing Android SDK Platform-tools, revision 23.1.0
    Stopping ADB server succeeded.
    Installed Android SDK Platform-tools, revision 23.1.0
  Installing Google APIs Intel x86 Atom System Image, Google Inc. API 23, revision 12
    Installed Google APIs Intel x86 Atom System Image, Google Inc. API 23, revision 12
    Stopping ADB server succeeded.
    Starting ADB server succeeded.
  Done. 5 packages installed.


Installing Archives:
  Preparing to install archives
  Installing SDK Platform Android 6.0, API 23, revision 2
    Installed SDK Platform Android 6.0, API 23, revision 2
  Done. 1 package installed.
Android SDK is up to date.
Creating Android virtual device
Android virtual device Nexus_5_API_23_x86 was successfully created

Note how the setup failed to rename a directory from from:

C:\Users\Bob\AppData\Local\Android\sdk\platforms\android-23

to:

C:\Users\Bob\AppData\Local\Android\sdk\temp\RemotePlatformPkgInfo.old01

This could be the cause of the problem.

On Windows this typically means that a program is using that folder (for example Windows Explorer or your anti-virus software.)

The "program" might be Android Studio Setup itself! In which case it's Android Studio Setup that's doing it wrong, but accuses other programs of doing so.

It may also mean that the Android Studio Setup did not have administrator privileges when it tried to rename or move folders in AppData. Therefore, right clicking on the Android Studio Setup EXE file and choosing to run as administrator might help avoid this error.

Or! It might have tried overstepping itself and doing it in the wrong order, i.e. cutting the tree branch while still sitting on it!

Clicking to try again was sufficient in my case. This can be seen by the log.

Installing Archives:
  Preparing to install archives
  Installing SDK Platform Android 6.0, API 23, revision 2
    Installed SDK Platform Android 6.0, API 23, revision 2
  Done. 1 package installed.

After completing the setup, with or without errors, you can run the SDK Manager to see if "android-23" component was installed. Start Android Studio, click on Configure button from the Quick Start menu, then SDK Manager. Then navigate to Appearance & Behavior, System Settings, Android SDK. Check the "Show Package Details" box and make sure all the API level 23 packages that are selected have the status "installed". You can uninstall, install, reinstall and update packages this way.

android sdk manager

like image 75
Samir Avatar answered Oct 25 '22 03:10

Samir