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

浪尽此生 提交于 2019-11-27 00:53:20

问题


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:

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?


回答1:


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.



回答2:


I had the same error.

Launch Android Studio with administrative permissions

It worked for me.




回答3:


I got same problem, I fixed it by running android studio as administrator,

otherwise you can run it manually when require.




回答4:


I solved the issue with giving the "Users" Full control on the directory

C:\Users\hans%20naert\\.android\monitor-workspace

(space in username is converted to %20 ... => for me "Hans Naert" becomes "hans%20naert)

screencapture of securitysettings




回答5:


Run your Command Prompt or Android Studio with administrative privileges provided, and start the Android Device Monitor



来源:https://stackoverflow.com/questions/17424533/android-ddms-monitor-does-not-start-if-user-profile-contains-a-space-in-it

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!