[Solved] Android SDK location should not contain whitespace, as this cause problems with NDK tools

Recently I have installed the last version of Android Studio (Android Studio 2.1), keeping the old 1.2 version previously installed. Now i have Android Studio 2.1 and Android Studio 1.2. In Android Studio 1.2 when I click on SDK Manager it works properly, but in Andorid Studio 2.1 this problem appears:

how can I fix keeping the two versions of Android studio? Thanks

Solution #1:

As the warning message states, the SDK location should not contain whitespace.

Your SDK is at C:UsersGiacomo BAppDataLocalAndroidsdk. There is a whitespace character in Giacomo B.

The easiest solution is to move the SDK somewhere else, where there is no space or other whitespace character in the path, such as C:Androidsdk. You can point both Android Studio installations to the new location.

Respondent: Bryan Herbst

Solution #2:

There is another way:

  1. Open up CMD (as Administrator)
  2. Type: mklink /J C:Program-Files "C:Program Files" (Or in my case mklink /J C:Program-Files-(x86) "C:Program Files (x86)")
  3. Hit enter
  4. Magic happens! (Check your C drive)

Now you can point to C:Program-Files (C:Program-Files-(x86)).

Respondent: Mehdi Dehghani

Solution #3:

just change the path:

"c:program filesandroidsdk" to "c:progra~1androidsdk"
"c:program files (x86)androidsdk" to "c:progra~2androidsdk"

note that the paths should not contain spaces.

Respondent: Willem

Solution #4:

It is possible to make a symbolic link from e.g. C:Androidsdk to the actual location of the sdk (which contains whitespaces), and refer to this symbolic link from within Android Studio as the location of the SDK. I have, however, not tried whether NDK will work with such a setup, even though Android Studio stops giving this warning about whitespaces.

Respondent: mous

Solution #5:

As long as you aren’t using the NDK you can just ignore that warning.

By the way: This warning has nothing to do with parallel installations.

Respondent: F43nd1r

Solution #6:

Simply….If you are not using NDK, there is no problem at all. On the other this is just warning not an error. With warning you can go ahead but not errors. Any it’s better to adjust the whitespaces.
E.g if your SDK is at C:program fileAndroid studio. There is a whitespaces “program file”.
There are 2 simple methods:
1. Remove the whitespaces
2. Install at another location which don’t have whitespaces.

Respondent: Naveed Ashraf

Solution #7:

I have the same error, make some change in the path C:UsersJuan JoseApp—- to

  1. CMD Command (Windows) go to root c:Users
  2. Type de command DIR /X
    Here show a Short name of Juan Jose
  3. Reemplace the name Juan Jose with the Short Name give it.
Respondent: heriberto777

Solution #8:

Copy your SDK folder and paste it in another folder without spaces (for example: “D: / Android / Sdk”), then open the SDK Manager, and change the Android SDK Location to the location of your new SDK folder

Respondent: Faizullah Anwar

Solution #9:

Just change

C:UsersGiacomo BAppDataLocalAndroidsdk



Respondent: Hidden Song

Solution #10:

I just wanted to add a solution for Mac users since this is the top article that comes up for searches related to this issue. If you have macOS 10.13 or later you can make use of APFS Space Sharing.

  • Open Disk Utility
  • Click Partition
  • Click Add Volume — no need to Partition as we are adding an APFS volume which shares space within the current partition/container)
  • Give the volume a name (without spaces)
  • Click Add
  • You can now mount this drive like any other via Terminal: cd /Volumes/<your_volume_name>
  • Create an empty folder in the new volume — I called mine sdk
  • You can now select the volume and directory while installing Android Studio
Respondent: Martin Carstens

Solution #11:

Just remove white space of all folders present in the given path for example Program Files
You can remove it by following steps->
Open elevated cmd,
In the command prompt execute:
mklink /J C:Program-Files “C:Program Files”
This will remove space and replace it with “-“.
Better do this with both sdk and jdk path.
This works 🙂

Respondent: Pooja Thakare

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy