单击AVD“创建设备”按钮抛出NullPointerException

时间:2014-10-03 14:54:02

标签: java android avd

有很多帖子抱怨AVD创建设备,但大多数人抱怨该按钮被禁用。 Haven没有看到我在任何地方解决的具体问题。

我试图创建一个看起来像我的三星Galaxy S4 Mini的设备。我在32位Windows 7系统上从命令提示符启动AVD管理器。如果重要,Eclipse就会关闭。

enter image description here

当我点击“创建设备”按钮时,我得到了这个。

C:\java\adt-bundle-windows-x86-20140702\sdk\tools>android.bat avd

java.lang.NullPointerException at com.android.sdkuilib.internal.widgets.DeviceCreationDialog.okPressed(DeviceCreationDialog.java:916)
at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
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 org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at com.android.sdkuilib.internal.repository.ui.DeviceManagerPage.onNewDevice(DeviceManagerPage.java:658)
at com.android.sdkuilib.internal.repository.ui.DeviceManagerPage.access$100(DeviceManagerPage.java:97)
at com.android.sdkuilib.internal.repository.ui.DeviceManagerPage$3.widgetSelected(DeviceManagerPage.java:215)
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.ui.AvdManagerWindowImpl1.open(AvdManagerWindowImpl1.java:146)
at com.android.sdkuilib.repository.AvdManagerWindow.open(AvdManagerWindow.java:94)
at com.android.sdkmanager.Main.showAvdManagerWindow(Main.java:437)
at com.android.sdkmanager.Main.doAction(Main.java:379)
at com.android.sdkmanager.Main.run(Main.java:150)
at com.android.sdkmanager.Main.main(Main.java:116)

有人可以帮帮我吗?真的很感激任何帮助。

由于

1 个答案:

答案 0 :(得分:0)

出现同样的问题,删除并重新安装Android相关的所有内容(eclipse,SDK管理器和JDK)对我有用,卸载时请确保所有文件和文件夹也被删除。 我还建议您迁移到Android Studio。