Android DDMS (Monitor) does not start if user profile contains a space in it

AFD picture AFD · Jul 2, 2013 · Viewed 12.2k times · Source

If I use a Windows account such as "User", the DDMS can be started from Android Studio.

If I use a Windows account which contains a space such as "Test User", the DDMS fails to launch:

enter image description here

The log shows the following:

!SESSION 2013-07-02 12:30:07.031 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_25
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_IE
Command-line arguments:  -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.osgi 4 0 2013-07-02 12:30:07.730
!MESSAGE Application error
!STACK 1
java.io.IOException: The folder "C:\Users\Test%20User\.android\monitor-workspace\.metadata" is read-only.
    at org.eclipse.core.runtime.internal.adaptor.BasicLocation.lock(BasicLocation.java:206)
    at org.eclipse.core.runtime.internal.adaptor.BasicLocation.set(BasicLocation.java:164)
    at org.eclipse.core.runtime.internal.adaptor.BasicLocation.set(BasicLocation.java:137)
    at com.android.ide.eclipse.monitor.MonitorApplication.start(Unknown Source)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

It does not work for 32 or 64-bit SDK versions and it does not break because of "Android tools installed in a directory with spaces in path do not work correctly" (they do on a "User" account)

Has anyone solved this issue?

Answer

dan picture dan · Sep 18, 2013

I've just come across this problem too. My workaround was to create a symbolic directory link from "Test%20User" to "Test User".

  1. Open a command prompt as administrator. (shift+ctrl+(enter or click) on the icon will do this)
  2. cd C:\Users
  3. mklink /d "Test%20User" "Test User"
  4. Launch monitor.bat and it should work.