3

Android Device Monitor fails to start with an error message that says to read the log file. However, the log file has a lot of information that is impossible to interpret without a better understanding of the program. Several people seem to have posted a similar question, but I can't find any useful answer.

On Windows 7 64 bit, I have Android Studio 1.0.2 and Eclipse Luna installed, both in 64 bit versions. Each have their own Android SDK installed. Everything in both environments seems to be working normally. I have Jre7 64 and jdk7 64 installed, and also jre7 32 for a separate program that requires the 32 bit java. JAVA_HOME is set to "C:\Program Files\Java\jre7" and the first path in the PATH variable is "C:\Program Files\Java\jre7\bin".

I am unable to start the device monitor from the tools directory of either SDK installation using the monitor.bat file. I am also unable to start the device monitor from it's 64 bit sub-directory using the monitor.exe file directly, which is what the batch file calls anyway.

This one has me completely stumped. Everything seems to be installed and working correctly. I am reluctant to spend hours trying various possible solutions, such as removing and reinstalling java, removing and installing the Android SDK, etc. when I have low confidence in those solving the issue. I've already spent a good bit of time trying to find an answer. If anyone can shed some light on this, it would be great.

Regards

Alfabravo
  • 7,493
  • 6
  • 46
  • 82
  • http://stackoverflow.com/questions/26396201/android-studio-error-when-clicking-on-android-device-monitor –  Feb 15 '16 at 00:33

2 Answers2

1

try to modify your monitor.ini file present in tools/lib/monitor-x86 folder. First of all backup it, then replace the content of this file with

-Xms256m
-Xmx512m

Now rerun monitor.bat. Hopefully this will fix your issue.

I was also facing the same problem. I have also tried running Android device monitor via monitor.bat but i get the following error in the log file

java.lang.NullPointerException
    at org.eclipse.core.runtime.URIUtil.toURI(URIUtil.java:280)
    at org.eclipse.e4.ui.internal.workbench.ResourceHandler.loadMostRecentModel(ResourceHandler.java:127)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.loadApplicationModel(E4Application.java:370)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:220)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:557)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at com.android.ide.eclipse.monitor.MonitorApplication.start(MonitorApplication.java:86)
    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)

Reference: https://stackoverflow.com/a/25159856/2073920

Community
  • 1
  • 1
Abdul Rauf
  • 5,798
  • 5
  • 50
  • 70
0
  1. Make sure the JAVA_HOME environment variable refers to the correct Java Runtime Environment location on your C:\ drive.
  2. Make sure you launch the 64-bit verions of Eclipse or Android Studio.
Fizz Binn
  • 115
  • 1
  • 8
  • Yes, both of these are true. I thought I made that clear in my question. This is why I am stumped, because all of the common solutions do not resolve the failure. – Michael Purcell Jan 21 '15 at 14:18
  • What does the error say when you try to launch Eclipse or Android Studio? – Fizz Binn Jan 21 '15 at 15:15
  • Thanks @Fizz Binn for your answers. I have the 64 bit version of Eclipse installed and not the 32 bit version. Android Studio only has one install package, and though I didn't find any information about it's internal workings, I assume that it detects the version of the system it is being installed on, because on my system it is installed in C:\Program Files\Android\Android Studio\... – Michael Purcell Jan 22 '15 at 13:48
  • There is no error when launching Android Studio or Eclipse. They both run without problems. The error is thrown when launching Device Monitor, whether from the exe file, the bat file, or from within Android Studio. The error message dialog has a title of "Monitor" and the following text: "An error has occurred. See the log file C:\Users\...\AppData\Local\Android\sdk\tools\lib\monitor-x86_64\configuration\1421932938759.log" – Michael Purcell Jan 22 '15 at 13:59