Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio SDK is missing

I had a USB connection problem when I debug and updated BIOS then, the laptop had problem with drive so, I needed to recover it. So, I recovered it with removing all the applications and just kept my personal files.

And I downloaded and installed Android Studio again, and SDK missing problem occurred like below:

  1. I can't see 'SDK' when I install Android Studio from here. So, I can't select any. enter image description here

  2. I tried with SDK Manager. I can't install any versions with "Your Android SDK is missing, out of date, or corupted." error.

enter image description here

  1. I tried Update. But nothing changed. (Updated to 3.3.1, but failed to Sync SDKs ERROR.)

  2. Some people on Stack-overflow suggested to download SDK separately, but their links just show Android Studio installer, which I already installed. Maybe the links were so old.

  3. "C:\Users\XXX\AppData\Local\Android\Sdk" does not exists. enter image description here

  4. I uninstalled Android Studio include User setting and reinstalled it.(There is no such thing that I can select previous version kind of thing.) But the result is the same.

like image 784
c-an Avatar asked Jan 02 '23 06:01

c-an


1 Answers

TL;DR This is sometimes caused by Windows registry settings retained with the current AndroidStudio project. To fix, just startup Android Studio and then close the current project (File -> Close Project). If this was the problem, AS will now go into a long update and restart cycle to repair itself, but will end with success.

I also recommend that you then change AS settings to not open the last project on Startup (Settings -> System Settings -> Reopen projects on startup)


Windows 10, Android Studio v3.6 and v4.0.

This one drove me nuts! I had the same problem - my SDK seemed to be corrupt so I did a full Uninstall (v3.6) and Install (4.0) of Android Studio and when Android Studio started up I got the same message Android SDK is missing.

The SDK Manager in Tools wasn't working.

I went to the link and there was nothing to download the SDK. So I installed the file which looked a bit like the SDK, commandlinetools-win-6514223_latest.zip, unzipped, and then tried to use the missing SDK dialog to include it in AS, and no joy.

BUT - I noticed that after an uninstall and fresh install Android Studio still came up with the last project I was working on so I guessed it must be something in the windows registry (rather than AS settings). I closed that project and AS suddenly popped up a dialog to install the SDK!

After a big download and install, Android Studio returned with the SDK (and SDK manager) all functioning!

So - just startup Android Studio and then close the current project (File -> Close Project)!


How I did a complete re-install.

Uncheck the "Keep Settings" (or similar) option in the Uninstall dialog, but export your settings first (File -> Export Settings). I found it easy to: Export settings; Complete Uninstall; Download and Install; Import Settings;. But, or course, there were several massive downloads. Still don't know why the last open file came up after the fresh install. It's probably in the registry, so, if there are still problems then you'll have to clear AS from the registry as well. Which sounds painful.

like image 122
Stephen Hosking Avatar answered Jan 03 '23 19:01

Stephen Hosking