2010-12-06 77 views
38

我今天升級到Android SDK工具r8,我似乎無法運行draw9patch工具。我收到以下錯誤:Android draw9patch拋出NoClassDefFoundError

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:633) 
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) 
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) 
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) 
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) 
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) 
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) 
Caused by: java.lang.ClassNotFoundException: org.jdesktop.swingworker.SwingWorker 
at java.net.URLClassLoader$1.run(URLClassLoader.java:202) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) 
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:307) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:248) 
... 9 more 

我正在運行雪豹,並有jre(或jdk?)1.6。

任何想法如何讓這個工作?謝謝!

+1

非常有趣。在Ubuntu上也是如此。 – 2010-12-06 21:07:03

+1

我也在這裏(Ubuntu 10.04,官方JDK 6)。我認爲這值得在http://code.google.com/p/android/issues/list – mreichelt 2010-12-06 21:12:38

回答

89

我找到了一個解決方案(Ubuntu 10.10,java-6-sun)。將swing-worker.jar複製到/ path_to_android_sdk/tools/lib中。您可以在SDK r7的同一目錄中找到swing-worker-1.1.jar或從here下載它。

相關問題