roid的draw9patch抛出的NoClassDefFoun

roid的draw9patch抛出的NoClassDefFoun

本文介绍了Android的draw9patch抛出的NoClassDefFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我今天升级到Android SDK工具R8和我似乎无法运行draw9patch工具。我收到以下错误:

I upgraded to Android SDK Tools r8 today and I can't seem to run the draw9patch tool. I'm getting the following error:

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。

I'm running snow leopard and have jre (or jdk?) 1.6.

任何想法如何得到这个工作?谢谢!

Any ideas how to get this working? Thanks!

推荐答案

我已经找到了解决方案(Ubuntu的10.10,JAVA-6-太阳)。复制摇摆worker.jar成/ path_to_android_sdk / tools / lib目录。你可以找到摆动工人1.1.jar在SDK R7相同的目录或的。

I have found a solution(Ubuntu 10.10, java-6-sun). Copy swing-worker.jar into /path_to_android_sdk/tools/lib. You can find swing-worker-1.1.jar in the same directory in SDK r7 or download it from here.

这篇关于Android的draw9patch抛出的NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 22:04