单击Android设备监视器时出现Android Studio错误

kin*_*aro 13 android android-studio

每当我点击Android设备监视器时,我在android studio中出现此错误:

---------------------------
Monitor
---------------------------
An error has occurred. See the log file
C:\Users\<user>\AppData\Local\Android\android-studio\sdk\tools\lib\monitor-x86_64\configuration\1413432754457.log.
---------------------------
Aceptar   
---------------------------
Run Code Online (Sandbox Code Playgroud)

并且日志文件包含以下内容:

!SESSION 2014-10-15 23:12:34.229 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_67
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=es_CO
Command-line arguments:  -os win32 -ws win32 -arch x86_64
!ENTRY org.eclipse.osgi 4 0 2014-10-15 23:12:34.641
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
    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)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Run Code Online (Sandbox Code Playgroud)

请帮帮我,它不会打开SDK Manager,Device Monitor和AVD Manager.

Moh*_*een 26

我正在添加这个答案,因为我认为这将对未来的访问者有所帮助.

我遇到了同样的问题,并设法解决了它.但是,我的解决方案与已经提到的解决方案不同.

首先,monitor.ini文件位于C:\ Users \\ AppData\Local\Android\sdk\tools\lib\monitor-x86_64中,config.ini文件位于./configuration文件夹中

当我检查日志文件时,它说(在文件的最后):

java.io.IOException:文件夹"C:\ Users\.android\monitor-workspace.metadata"是只读的.

所以我monitor.exe 以管理员身份运行,它工作正常.

接下来我以管理员身份运行Android Studio,ADM按钮运行正常.


Har*_*ana 3

config.ini文件应在 osgi.bundles 属性中指定org.eclipse.core.runtime@start 这是默认的 osgi.bundles 属性,可能在升级过程中(意外地)更改了:

您需要将以下行添加到eclipse.ini monitor.ini的底部,该文件是位于 android-sdk\tools\lib\monitor-x86_64\ 文件夹中的配置设置文件:

-Dosgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start
Run Code Online (Sandbox Code Playgroud)

之后,从您进行更改的同一文件夹运行 Android Device Monitor,而不是从 Android Studio 运行,然后右键单击带有eclipse 图标的监视器 > 以管理员身份运行

参考: 启动 Eclipse 时出现“无法获取应用程序服务”错误