Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to open DDMS in Android Studio. Mysterious Eclipse error pops up

So here I go again with yet another Android Studio tools error. I don't think this one has been reported before, I can't find any posts on it.

I am trying to open the Device Monitor (DDMS) in Android Studio by clicking on the following button:

enter image description here

Every time I get the same error. What's really puzzling is that its an Eclipse error, as shown in the image:

enter image description here

So it tells me to open a log file in the Android Studio SDK folder. The log file contains lots of text, but the main error is reported as:

!ENTRY org.eclipse.osgi 4 0 2015-05-27 09:40:53.091
!MESSAGE Application error
!STACK 1
java.io.IOException: The folder "C:\Users\JOHN%20SMITH\.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(MonitorApplication.java:53)
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:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

Why am I unable to open DDMS from Android Studio, and why is an Eclipse error thrown when trying to open DDMS from Android Studio ? Can anyone guide me ? Has anyone even seen this error before ? All responses will be gratefully appreciated.

EDIT:

As pointed out by Daniel Nugent in the comments below, the DDMS shipped with Studio seems to be exactly, exactly the same as the one in Eclipse. Wonder if this is a clue to the problem. And for the record, I do have Eclipse installed on my PC for maintaining some legacy code.

EDIT 2:

The solution is here. Many, many thanks to Skizo and Blackbelt for this, both of you were spot-on!

like image 388
Y.S Avatar asked May 27 '15 04:05

Y.S


1 Answers

I think the problem is about your %20 in your name, then you can try it out this answer, it seems like yours :

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.
like image 158
Skizo-ozᴉʞS Avatar answered Sep 22 '22 02:09

Skizo-ozᴉʞS