Some 20 years after someone thought it was a nice idea to allow spaces in path names on Windows, it still is a bad idea to rely that just “works” for everything.
Today I tried to see if it still applied what I mentioned 2 years ago during the German BASTA! Fall conference in the Rheingoldhalle when talking about cross platform .NET development using MonoDroid/MonoTouch/Visual Studio:
Do not install in a directory with spaces (not C:\Program Files, but C:\android-sdk)
And it does still apply: though not mentioned in the Android SDK/ADT documentation, most of the batch files in the Android SDK ADT bundle are not compatible being stored in a path that has spaces.
Unquoted referrals to paths like this are used in most SDK batch files:
cd /d %~dp0
The only way to run these batch files is with the current directory being the directory of the batch file itself, or referring to them in their fully quoted form.
Another correct way would be to use short names, but that’s only done in
Summary of the batch files and how they are affected:
(Side note: most incompatible batch files correctly do `for %%i in (“%cd%”) do set prog_dir=%%~fsi`)
So: make sure “…” is a path not containing spaces.