The following SDK component was not installed: sys-img-x86-addon-google_apis-google-21

Issue:

When we tried to install android studio on Ubuntu 16.04 we got the following error at the very end of the installation. The installation was almost done but at last moment it failed showing following error:

The following SDK component was not installed: sys-img-x86-addon-google_apis-google-21

Reason:

In our case we had an older version of android-studio installed on our system. When we tried to install a new version of android-studio some of components were loading from older version. This version conflict causes this issue.

Solution:

we had to uninstall the older version by following this. After the uninstallation when we tried the new installation, the issue was gone.