views:

253

answers:

2

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
+1  A: 

What version of OS X are you on? What does "java -version" give you?

A possible easy workaround: Try installing the SDKs you need from inside Eclipse after installing the ADT plugin using Window -> Android SDK and AVD Manager, instead of the standalone frontend tool. Since that runs inside Eclipse, there tends to be fewer weird library compatibility issues.

Yoni Samlan
Thanks for the suggestion; I found the actual cause of the problem, but this is great info for the future.
Feanor
+1  A: 

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.

Feanor