So you’ve downloaded the latest version of Android Studio and created a project using either Java or Kotlin. Just before it gets created, Android Studio gives you an error message stating that:
Android SDK location cannot be at the filesystem root
Sometimes you also get a message stating:
SDK emulator directory is missing
This post will show you how to resolve this problem on Windows, Linux and even Mac.
If you’re on Windows, download the “No .exe installer” zip archive instead of the “exe” binary. This will make it easier to start from scratch in case you make a mistake. Those on Linux and Mac can only download compressed archives.
Unpack the archive to a non-root directory. If you’re on Windows avoid:
- Installing to the root drive i.e. the top-level directory of the drive you installed Windows on. You can create a subdirectory in c:(assuming this is your root drive) and then copy the extracted Android folder there.
- Installing into the “Program Files” directory or any directory where Windows requires elevated privileges to copy the extracted folder.
Those on other systems can extract the Android folder into their home directories. This will usually resolve the problem for you.
Hope this helps 🙂