(首先,我为我的英语道歉,这不是我真正的语言)
我从昨天开始尝试安装 Android SDK。
我在 Mac OSX 10.8.3和 java 1.6.0_51上,Android SDK 版本是adt-bundle-mac-x86_64-20130522。
当我启动 SDK 管理器(通过 Eclipse或通过 CLI)时,我可以看到窗口,我可以选择我希望安装的 SDK 版本,但是当我单击install packages...按钮时,它会崩溃。
崩溃的堆栈跟踪是:
java.lang.NullPointerException
at org.eclipse.swt.graphics.Device.getFontList(Unknown Source)
at org.eclipse.jface.resource.FontRegistry.filterData(FontRegistry.java:465)
at org.eclipse.jface.resource.FontRegistry.createFont(FontRegistry.java:499)
at org.eclipse.jface.resource.FontRegistry.defaultFontRecord(FontRegistry.java:563)
at org.eclipse.jface.resource.FontRegistry.defaultFontData(FontRegistry.java:575)
at org.eclipse.jface.resource.FontRegistry.getFontData(FontRegistry.java:591)
at org.eclipse.jface.dialogs.Dialog.dialogFontIsDefault(Dialog.java:1077)
at org.eclipse.jface.dialogs.Dialog.applyDialogFont(Dialog.java:998)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:756)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at com.android.sdkuilib.internal.repository.SdkUpdaterChooserDialog.create(SdkUpdaterChooserDialog.java:316)
at org.eclipse.jface.window.Window.open(Window.java:790)
at com.android.sdkuilib.internal.repository.SwtUpdaterData.updateOrInstallAll_WithGUI(SwtUpdaterData.java:232)
at com.android.sdkuilib.internal.repository.ui.PackagesPage.onButtonInstall(PackagesPage.java:1033)
at com.android.sdkuilib.internal.repository.ui.PackagesPage.access$1100(PackagesPage.java:83)
at com.android.sdkuilib.internal.repository.ui.PackagesPage$10.widgetSelected(PackagesPage.java:367)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.notifyListeners(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.SdkUpdaterWindowImpl2.open(SdkUpdaterWindowImpl2.java:148)
at com.android.sdkuilib.repository.SdkUpdaterWindow.open(SdkUpdaterWindow.java:111)
at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:356)
at com.android.sdkmanager.Main.doAction(Main.java:334)
at com.android.sdkmanager.Main.run(Main.java:120)
at com.android.sdkmanager.Main.main(Main.java:103)
当我在互联网上搜索更多信息时,有些人似乎有同样的问题,并说这是因为字体缓存问题......但我检查了字体重复:没有问题,并按照描述清理字体缓存,并且错误仍然发生。
我真的需要解决这个问题,我希望这里的任何人都可以帮助我。
提前致谢,
编辑:这个问题被标记为重复,但那里列出的解决方案没有解决问题。解决方案是禁用字体书中的所有字体。已安装的字体之一已损坏,这导致 SWT 中断。