简体   繁体   English

Android设备监视器无法启动

[英]Android Device Monitor will not start

Android Device Monitor fails to start with an error message that says to read the log file. Android设备监视器无法以读取日志文件的错误消息启动。 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. 在Windows 7 64位上,我安装了Android Studio 1.0.2和Eclipse Luna,两者都是64位版本。 Each have their own Android SDK installed. 每个都安装了自己的Android SDK。 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. 我安装了Jre7 64和jdk7 64,还有jre7 32用于需要32位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 ". JAVA_HOME设置为“ C:\\Program Files\\Java\\jre7 ”,PATH变量中的第一个路径是“ 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. 我无法使用monitor.bat文件从SDK安装的tools目录启动设备监视器。 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. 我也无法直接使用monitor.exe文件从它的64位子目录启动设备监视器,这正是批处理文件所调用的。

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. 我不愿花几个小时尝试各种可能的解决方案,例如删除和重新安装java,删除和安装Android SDK等等,当我对解决问题的人信心不足时。 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 问候

try to modify your monitor.ini file present in tools/lib/monitor-x86 folder. 尝试修改tools/lib/monitor-x86文件夹中的monitor.ini文件。 First of all backup it, then replace the content of this file with 首先备份它,然后替换此文件的内容

-Xms256m
-Xmx512m

Now rerun monitor.bat . 现在重新运行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 我也试过通过monitor.bat运行Android设备监视器,但我在日志文件中收到以下错误

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 参考: https//stackoverflow.com/a/25159856/2073920

  1. Make sure the JAVA_HOME environment variable refers to the correct Java Runtime Environment location on your C:\\ drive. 确保JAVA_HOME环境变量引用C:\\驱动器上的正确Java Runtime Environment位置。
  2. Make sure you launch the 64-bit verions of Eclipse or Android Studio. 确保启动Eclipse或Android Studio的64位版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM