31

In Android Studio when I try running Android Device Monitor, I get the following error on log file:

    >!SESSION 2014-12-17 09:57:30.625 -----------------------------------------------
    eclipse.buildId=unknown
    java.version=1.8.0_25
    java.vendor=Oracle Corporation
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_BR
    Command-line arguments:  -os win32 -ws win32 -arch x86_64 -data @noDefault

    >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.366
    !MESSAGE Bundle reference:file:org.apache.ant_1.8.3.v201301120609/@4 not found.

    >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.372
    !MESSAGE Bundle reference:file:org.apache.jasper.glassfish_2.2.2.v201205150955.jar@4

not found.

    >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.373
    !MESSAGE Bundle reference:file:org.apache.lucene.core_2.9.1.v201101211721.jar@4 not

found.

    >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.439
    !MESSAGE Bundle reference:file:org.eclipse.help.base_3.6.101.v201302041200.jar@4 not

found.

    >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.439
    !MESSAGE Bundle reference:file:org.eclipse.help.ui_3.5.201.v20130108-092756.jar@4 not

found.

    >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.440
    !MESSAGE Bundle reference:file:org.eclipse.help.webapp_3.6.101.v20130116-182509.jar@4

not found.

...

    >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:32.218
    !MESSAGE Application error
    !STACK 1
    >java.io.IOException: The folder "C:\Users\SAA%20PC\.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(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:629)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

Anyone know what could it be? Thanks for any help.

Chris
  • 5,876
  • 3
  • 43
  • 69
Doug
  • 1,643
  • 2
  • 13
  • 10

10 Answers10

72

If you are on windows try opening your Android Studio in Administrative Mode (Run as administrator)

IronBlossom
  • 3,898
  • 3
  • 35
  • 42
  • It worked! Thanks. Can you explain what was the cause of the problem? – Evgeniy Mishustin Dec 24 '15 at 19:15
  • 2
    @LuciusHipan Administative Mode elevates the process to access and writes on `/AppData`. From the log it seemed that the process wanted to change data on the `/Users` folder but couldn't able to because of right privilege. – IronBlossom Dec 25 '15 at 06:25
  • @IronBlossom i have installed sdk in d drive and i dont think that it needs any other permission ,although this answer solved my problem – Adnan Ali Jun 29 '16 at 07:26
  • 1
    Is there any way to do this without running as an admin? – Chris Aug 12 '16 at 19:17
  • @IronBlossom I am using android studio in linux, what should i do for it. – Naitik May 24 '17 at 07:12
  • @Naitik Try opening Android Device Monitor from the sdk with gksu or gksudo cmd. – IronBlossom May 24 '17 at 07:20
  • Awesome, I was trying to start it from the command line and opening the command prompt as admin fixed it! – Amber Jul 27 '17 at 18:54
39

I encounter this problem before. I fixed this issue by killing or ending "monitior.exe" running process using Taskmanager in Windows. Then click ADM (Android Device Monitor) and it works

dr.Crow
  • 1,493
  • 14
  • 17
  • 1
    Definitely should be the accepted answer...fixed on mac too just force quit the monitor process – Rich Dec 16 '16 at 10:00
  • Yep! I had a bunch of these running (because I like to pound on things to get them to work - haha). Killed all of them and then back to VS to "Open Android Device Monitor (DDMS)" in the Android Toolbar. Voila! – Adam Cox Apr 25 '17 at 21:06
  • Fixes problem on Win7 + VS 2017 – Bartosz Aug 09 '17 at 09:41
  • Thank you for the tip. This solves multiple problems - unable to start ADM, no debuggable processes... – Hong Mar 24 '18 at 16:09
9

This is due to the error that the android device monitor not able to locate the jre so in order to solve this :

please follow the following Steps:

Step 1 : In your android studio find the jdk path, then inside jdk locate the jre and copy it. (In case of Linux jre is located inside android studio folder)

Step 2 : After copying jre paste it inside the (Android/Sdk/tools/lib/monitor-x86_64/) i.e monitor-x86_64 directory

I tried this for linux operating system, Android device monitor started well without any error.

Thanks, Hope this will help to someone!

Aman Kumar Gupta
  • 2,640
  • 20
  • 18
  • This answer worked for me with Android Studio 3.0.1, Why this is happening, Is it because of my environmental Variables? – Davoud Apr 07 '18 at 07:57
7

I had the same issue with Mac OS X.

To solve it:

  • Open a terminal window
  • Navigate to your SDK
  • Locate the 'tools' folder
  • cd into it
  • run: sudo ./monitor
  • Type in your password

Good to go!

David Azar
  • 371
  • 3
  • 13
4

This is the problem due to updating SDK tools Android SDK Tools

  • close the Android Studio
  • open the SDK Manager.exe from SDK folder
  • Now install Android SDK tool in my case tool is Rev.24.3.2
  • open Android Studio it will show new tool is available install it,install that one and try to restart it.
2

No need to restart android-studio. Just do this:

  1. Navigate to C:\Android\sdk\tools.
  2. Find monitor.bat
  3. Right-click and Run as administrator
Darush
  • 11,403
  • 9
  • 62
  • 60
2

I used jdk-12 in Windows-10 platform, and kinda faced the same problem. This is what I did:

  1. Changed the monitor.exe file's compatibility to "Run as Administrator"-- Didn't work
  2. Checked if the java path (JAVA_HOME and PATH) variables are set, in the Environment Variables. --Didn't work
  3. Finally uninstalled jdk-12 and installed jdk-8 and altered the path (JAVA_HOME and PATH) variables in Environment Variables. -- Worked!!!!! And then the adb opened without any error.
GuruJeya
  • 131
  • 1
  • 7
  • 1
    This is the correct answer. In my case, I use OpenJDK 14 and it's not working. But after I installed Oracle JDK 8, it's working! – dns Dec 08 '20 at 20:47
  • 1
    It help for me. Thank you. I used jdk-11. Reinstall at JDK8 and it work – Dmitry Dronov Dec 30 '20 at 15:54
1

you don't need to restart android Studio only you need to open cmd as administrator and navigate to you SDK tools directory and write monitor in my case C:\Android\sdk\tools\monitor

  • 1
    Welcome to stack overflow! Answers as short as this can be posted in the comments section – cdomination Jul 21 '16 at 12:37
  • @cdomination: I disagree. If it is genuinely a new answer, it should be posted as an answer. "shortness" isn't an issue, though "completeness" often is (many "short" answers don't give enough detail. Not the case here - it truly is that simply.) Benefits: 1) Not buried in comments. 2) If it works for other people, they can vote it up. 3) If it needs improving, it can be improved or commented on. – ToolmakerSteve Sep 17 '18 at 23:43
1

I had the same problem with my Android Studio 2.3.1 running on Ubuntu 14.04LTS. I was using openjdk 7. I updated it to openjdk 8 and viola! problem got solved.

Shashank
  • 47
  • 5
0

Answer for Xamarin;

Solution is same as answer from Aman Kumar Gupta. What causes problem is;

Normally as standard Xamarin installs Android Sdk on this path C:\Program Files (x86)\Android\android-sdk But this path is not accepted by Android Studio because of space within the path. So I had to chance the path to be like C:\Android\android-sdk after this Android Studio and Visual Studio shares the same path. But all of a sudden Android Device Monitor stopped working. Because as Aman Kumar Gupta said Jre location wasn't recognized somehow. You can just copy the jre folder from jdk folder and paste into the Android/Sdk/tools/lib/monitor-x86_64/. This should solve the problem

Emil
  • 6,411
  • 7
  • 62
  • 112