Android Draw 9-patch seems broken too

As far as I can tell, the current release of the Android SDK (R08) ships without the Swing Desktop jar, and this causes draw9patch to fail.
~$ draw9patch &

[2] 52452
~$ Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError:
org/jdesktop/swingworker/SwingWorker
at com.android.draw9patch.Application$1.run(Application.java:48)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

[2]+ Done draw9patch

The ‘fix’ is rather simple: just download the JAR for Swing Desktop from here, and drop the swinglabs-0.8.0.jar file into the [sdk-install-dir]/tools/lib folder.
The Swing Desktop project can be found here.

Update — Richard just left a comment here and pointed me to his site (Android 9 Patch) who’s got plenty of 9-patch icons that really look awesome, and I thought I’d share the goodness (especially, given he’s so kind as to share them at no charge). 

Go check out Patch 15, it’s pretty impressive!
Advertisements

11 thoughts on “Android Draw 9-patch seems broken too

  1. In case people bang their heads on why 9-patches don't work, I found out that they all need to be in one directory drawable-xhdpi. Even if there are other .9.png files that you don't use at all, in any other directory, they won't work.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s