在Mac OS X上安装了Android SDK时,NullPointerException异常 [英] NullPointerException when installing the Android SDK on Mac OS X

查看:709
本文介绍了在Mac OS X上安装了Android SDK时,NullPointerException异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在安装Android SDK的Mac OS X上继Android开发网站上的说明,我已经下载了SDK,并修改了我的.bash_profile文件,包括路径。下一步是使用Android SDK和AVD管理实际下载平台。

然而,当我使用管理器安装平台,我得到在终端下面的错误。我环顾四周,在Eclipse和Android论坛上类似的问题,并没有发现任何东西。被别的损坏,在环境和需要修复?在哪里我应该看什么建议?

编辑:我对Java版本1.6 U17。刚刚更新OS X 10.6.3。

 显示java.lang.NullPointerException
在org.eclipse.swt.graphics.Device.getFontList(来源不明)
在org.eclipse.jface.resource.FontRegistry.filterData(FontRegistry.java:456)
在org.eclipse.jface.resource.FontRegistry.createFont(FontRegistry.java:490)
在org.eclipse.jface.resource.FontRegistry.defaultFontRecord(FontRegistry.java:551)
在org.eclipse.jface.resource.FontRegistry.defaultFontData(FontRegistry.java:563)
在org.eclipse.jface.resource.FontRegistry.getFontData(FontRegistry.java:579)
在org.eclipse.jface.dialogs.Dialog.dialogFontIsDefault(Dialog.java:1077)
在org.eclipse.jface.dialogs.Dialog.applyDialogFont(Dialog.java:998)
在org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:756)
在org.eclipse.jface.window.Window.create(Window.java:431)
在org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
在com.android.sdkuilib.internal.repository.UpdateChooserDialog.create(UpdateChooserDialog.java:280)
在org.eclipse.jface.window.Window.open(Window.java:790)
在com.android.sdkuilib.internal.repository.UpdaterData.updateOrInstallAll(UpdaterData.java:502)
在com.android.sdkuilib.internal.repository.RemotePackagesPage.onInstallSelectedArchives(RemotePackagesPage.java:323)
在com.android.sdkuilib.internal.repository.RemotePackagesPage.access $ 600(RemotePackagesPage.java:54)
在com.android.sdkuilib.internal.repository.RemotePackagesPage$7.widgetSelected(RemotePackagesPage.java:168)
在org.eclipse.swt.widgets.TypedListener.handleEvent(来源不明)
在org.eclipse.swt.widgets.EventTable.sendEvent(来源不明)
在org.eclipse.swt.widgets.Display.sendEvent(来源不明)
在org.eclipse.swt.widgets.Widget.sendEvent(来源不明)
在org.eclipse.swt.widgets.Widget.sendEvent(来源不明)
在org.eclipse.swt.widgets.Widget.sendEvent(来源不明)
在org.eclipse.swt.widgets.Widget.notifyListeners(来源不明)
在org.eclipse.swt.widgets.Display.runDeferredEvents(来源不明)
在org.eclipse.swt.widgets.Display.readAndDispatch(来源不明)
在com.android.sdkuilib.internal.repository.UpdaterWindowImpl.open(UpdaterWindowImpl.java:104)
在com.android.sdkuilib.repository.UpdaterWindow.open(UpdaterWindow.java:110)
在com.android.sdkmanager.Main.showMainWindow(Main.java:281)
在com.android.sdkmanager.Main.doAction(Main.java:247)
在com.android.sdkmanager.Main.run(Main.java:92)
在com.android.sdkmanager.Main.main(Main.java:81)
登出
 

解决方案

我发现有更新到10.6.3后一个问题(应该知道)。我无法找到任何东西,但发布此之后,我突然无法打开Eclipse无论是。这导致在苹果论坛上的主题说明问题可能是一个损坏的字体缓存,这反过来又导致了如何清除字体缓存的此处。按照说明来清除字体缓存后,我试图Eclipse和Android的重新安装;这一次,它的工作完美。

I'm installing the Android SDK on Mac OS X. Following the instructions on the Android Development site, I've downloaded the SDK and modified my .bash_profile to include the path. The next step is to use the Android SDK and AVD Manager to actually download the platforms.

However, when I use the Manager to install the platforms, I get the following error in the Terminal. I've looked around for similar problems in the Eclipse and Android forums and haven't found anything yet. Is something else damaged in the environment and needs to be repaired? Any recommendations on where I should look?

EDIT: I'm on Java version 1.6-u17. Just updated OS X to 10.6.3.

java.lang.NullPointerException
at org.eclipse.swt.graphics.Device.getFontList(Unknown Source)
at org.eclipse.jface.resource.FontRegistry.filterData(FontRegistry.java:456)
at org.eclipse.jface.resource.FontRegistry.createFont(FontRegistry.java:490)
at org.eclipse.jface.resource.FontRegistry.defaultFontRecord(FontRegistry.java:551)
at org.eclipse.jface.resource.FontRegistry.defaultFontData(FontRegistry.java:563)
at org.eclipse.jface.resource.FontRegistry.getFontData(FontRegistry.java:579)
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.UpdateChooserDialog.create(UpdateChooserDialog.java:280)
at org.eclipse.jface.window.Window.open(Window.java:790)
at com.android.sdkuilib.internal.repository.UpdaterData.updateOrInstallAll(UpdaterData.java:502)
at com.android.sdkuilib.internal.repository.RemotePackagesPage.onInstallSelectedArchives(RemotePackagesPage.java:323)
at com.android.sdkuilib.internal.repository.RemotePackagesPage.access$600(RemotePackagesPage.java:54)
at com.android.sdkuilib.internal.repository.RemotePackagesPage$7.widgetSelected(RemotePackagesPage.java:168)
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.UpdaterWindowImpl.open(UpdaterWindowImpl.java:104)
at com.android.sdkuilib.repository.UpdaterWindow.open(UpdaterWindow.java:110)
at com.android.sdkmanager.Main.showMainWindow(Main.java:281)
at com.android.sdkmanager.Main.doAction(Main.java:247)
at com.android.sdkmanager.Main.run(Main.java:92)
at com.android.sdkmanager.Main.main(Main.java:81)
logout

解决方案

I discovered that there is a problem after updating to 10.6.3 (should have known). I wasn't able to find anything about it, but after posting this, I suddenly couldn't open Eclipse either. That led to this thread on the Apple forums indicating that the problem could be a corrupt font cache, which in turn led to an explanation of how to clear the font cache here. After following the instructions for clearing the font cache, I tried both Eclipse and the Android install again; this time it worked perfectly.

这篇关于在Mac OS X上安装了Android SDK时,NullPointerException异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆