问题
I am using android API level 22.But this location was copied from another machine and it is in my E: drive.I have API level 23 installed in the following location:
C:\Program Files (x86)\Android\android-sdk
But when i try to change the location to the above one, i get the following message:
Android SDK location should not contain whitespace,as this can cause problem with the native tools.
How do i change the SDK location to the above location without having the issue of whitespaces.
回答1:
Change location to (in my case its located here)
C:\Users\johnrao\AppData\Local\Android\Sdk
Try Copying files in these folders or delete files and reinstall from the sdk manager
回答2:
Here is how I fixed this issue. No need to relocate directories.
On Windows, open an elevated command prompt. Hit the Win key, type 'cmd', right click on the cmd prompt search entry, select 'Run as Administrator".
In the command prompt, execute: mklink /J C:\Program-Files "C:\Program Files"
This will create a space-free directory path that points into the same directory as used by space-friendly software.
回答3:
If it is located in your home directory, as it seems to be by default, you can open up a Command Prompt to see what the "DOS" version of your home directory looks like:
dir /x C:\Users
Look at the 4th column, and it should show the valid 8-character (max) directory name that can be used in the Android Studio path.
来源:https://stackoverflow.com/questions/34127431/changing-sdk-location-in-android-studiowhitespaces-in-directory-location