java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.

时间:2024-03-14 09:07:45

环境,Ubuntu 17.10      Android Studio 3.0.1 今天被这个问题烦死找了很多方法就是没能找到解决的方法。

问题:

        在尝试启动 Android Device Monitor 时提示查看错误日志,主要问题如下:

java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.

java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.

参考方法

       结果网上很多,日志中提示问题在很多Tomcat 建站者,尝试在Linux尝试使用java进行绘图的使用者中出现,出现这些问题的前辈建议使用参数-Djava.awt.headless=true,然而我找遍了android-sdk 和 android-studio目下的可能的配置文件,甚至可执行脚本,但是没能找到具体配置在哪。

我在一些网站看到建议使用管理员的身份启动Android Studio,能够解决问题可惜,我出现了以下问题:

java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.

java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.

这个问题在一些使用eclips搬动工程的也会出现该问题eclipse启动报错 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the

Tomcat 建站者也出现

服务器Tomcat启动 访问出现Can't connect to X11 window server using 'localhost:0.0' as the value of the DISPLA

我的方法

            总之没能解决问题,我在一个官方论坛上看到了一个解决方法:

                               

,然而还是没能够解决。我尝试在SDK Manager 中升级一些东西,我看到LIB好吧事实我看错了,我看到LLDB没下载,就以为某些库没有安装。没想到竟然成功了,死耗子出现了。事实上我可能还勾了其他选项,不太清楚了。

java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.

我以为瞎猫是自己遇上了耗子,在我尝试着将上一个操作复原时(cp -r /opt/android-studio/jre/ /opt/android-sdk-linux/tools/lib/monitor-x86_64/ ),好吧又提示我查看日志,问题回到最开始的时候。好吧老实点。

改进以下,创建了一个符号链接代替复制搬运

                            ln -s  /opt/android-studio/jre/ /opt/android-sdk-linux/tools/lib/monitor-x86_64/

java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.


末学后进,不足缺漏之处还请见谅,指教。