6

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!

Community
  • 1
  • 1
Yash Sampat
  • 30,051
  • 12
  • 94
  • 120
  • from first use itself it show error ? – Tharif May 27 '15 at 04:50
  • well, yes. I don't recall being able to open DDMS from Android Studio. – Yash Sampat May 27 '15 at 04:53
  • could you try this one ,go to : \sdk\tools and open monitor.bat – Tharif May 27 '15 at 05:01
  • good idea, I just tried that and it gives the exact same error. – Yash Sampat May 27 '15 at 05:05
  • well..just one more try..change the location of your adt..move to some other drive where there is no read-write restriction..Thanks – Tharif May 27 '15 at 05:08
  • 1
    That is very interesting. I had never used that button before, but I was able to successfully open `Android Device Monitor`. This is on a Linux machine that has never had Eclipse installed on it. I went to the About box of `Android Device Monitor`, and there is a link to Eclipse.org, and if you click on `Installation Details`, all of the components have eclipse in the name. It appears that the same old Eclipse DDMS is included in the Android Studio installation, very interesting! – Daniel Nugent May 27 '15 at 05:19
  • @DanielNugent: I have to keep Eclipse installed for a while longer, until we finish the migration to Studio entirely. So no dice. – Yash Sampat May 27 '15 at 05:23
  • @Y.S. Yes, it's definitely very interesting! Unfortunately, I have no idea how to solve your issue though. Good luck! – Daniel Nugent May 27 '15 at 05:26
  • 1
    @DanielNugent: thanks for your time. I'm always glad to oblige and entertain :) – Yash Sampat May 27 '15 at 05:27
  • 1
    this `%20` looks strange. It is like the the space encoded, but usually windows (not a big fan/not very experienced) deals good with space. So my hard guess is that it is pointing to a not existing location on your machine. Is there on windows the possibility to make a symlink of `JOHN SMITH` to `JOHN%20SMITH`? – Blackbelt May 27 '15 at 07:32
  • @Blackbelt: many thanks, you were absolutely on the right track :) – Yash Sampat May 27 '15 at 10:18

2 Answers2

8

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.
Community
  • 1
  • 1
Skizo-ozᴉʞS ツ
  • 19,464
  • 18
  • 81
  • 148
0

you must run the application (android Studio) with a administrator permission

mostafa
  • 1
  • 2