本文介绍了正在启动Android AVD崩溃与java.awt.HeadlessException异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与太阳jav6-JDK在Ubuntu 11.04(纳蒂)使用Android SDK中经理版本15(6.26)安装。我试过一个AVD每个配置是造成此完全相同的行为,当我尝试启动它。我甚至试图与根privelages运行它。

  java.awt.HeadlessException异常
在sun.awt.HeadlessToolkit.getScreenResolution(HeadlessToolkit.java:221)
在com.android.sdkuilib.internal.widgets.AvdStartDialog.getMonitorDpi(AvdStartDialog.java:420)
在com.android.sdkuilib.internal.widgets.AvdStartDialog.createDialogContent(AvdStartDialog.java:179)
在com.android.sdkuilib.ui.GridDialog.createDialogArea(GridDialog.java:76)
在org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760)
在org.eclipse.jface.window.Window.create(Window.java:431)
在org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
在org.eclipse.jface.window.Window.open(Window.java:790)
在com.android.sdkuilib.internal.widgets.AvdSelector.onStart(AvdSelector.java:1035)
在com.android.sdkuilib.internal.widgets.AvdSelector.access $ 600(AvdSelector.java:76)
在com.android.sdkuilib.internal.widgets.AvdSelector $ 7.widgetSelected(AvdSelector.java:317)
在org.eclipse.swt.widgets.TypedListener.handleEvent(来源不明)
在org.eclipse.swt.widgets.EventTable.sendEvent(来源不明)
在org.eclipse.swt.widgets.Widget.sendEvent(来源不明)
在org.eclipse.swt.widgets.Display.runDeferredEvents(来源不明)
在org.eclipse.swt.widgets.Display.readAndDispatch(来源不明)
在com.android.sdkuilib.internal.repository.sdkman2.SdkUpdaterWindowImpl2.open(SdkUpdaterWindowImpl2.java:158)
在com.android.sdkuilib.repository.SdkUpdaterWindow.open(SdkUpdaterWindow.java:154)
在com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:335)
在com.android.sdkmanager.Main.doAction(Main.java:307)
在com.android.sdkmanager.Main.run(Main.java:119)
在com.android.sdkmanager.Main.main(Main.java:102)


解决方案

这是另一个解决办法是为我工作

易于得到净化太阳的Java *

APT通过这样做,自动安装的OpenJDK包...

Using Android SDK Manager Revision 15 on Ubuntu 11.04 (Natty) with sun-jav6-jdk (6.26) installed. Every configuration I've tried for an AVD is resulting in this exact same behaviour when I try to start it. I've even tried running it with root privelages.

java.awt.HeadlessException
at sun.awt.HeadlessToolkit.getScreenResolution(HeadlessToolkit.java:221)
at com.android.sdkuilib.internal.widgets.AvdStartDialog.getMonitorDpi(AvdStartDialog.java:420)
at com.android.sdkuilib.internal.widgets.AvdStartDialog.createDialogContent(AvdStartDialog.java:179)
at com.android.sdkuilib.ui.GridDialog.createDialogArea(GridDialog.java:76)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at org.eclipse.jface.window.Window.open(Window.java:790)
at com.android.sdkuilib.internal.widgets.AvdSelector.onStart(AvdSelector.java:1035)
at com.android.sdkuilib.internal.widgets.AvdSelector.access$600(AvdSelector.java:76)
at com.android.sdkuilib.internal.widgets.AvdSelector$7.widgetSelected(AvdSelector.java:317)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at com.android.sdkuilib.internal.repository.sdkman2.SdkUpdaterWindowImpl2.open(SdkUpdaterWindowImpl2.java:158)
at com.android.sdkuilib.repository.SdkUpdaterWindow.open(SdkUpdaterWindow.java:154)
at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:335)
at com.android.sdkmanager.Main.doAction(Main.java:307)
at com.android.sdkmanager.Main.run(Main.java:119)
at com.android.sdkmanager.Main.main(Main.java:102)
解决方案

This is another workaround that worked for me

apt-get purge sun-java*

APT installed the openjdk packages automatically by doing that...

这篇关于正在启动Android AVD崩溃与java.awt.HeadlessException异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 03:38