1

它编译得很好。加载到我的测试设备就好了。当我运行它时,它会崩溃并显示“抱歉,Bat 应用程序 Ear(进程 com.fleenlab.LWPA_EarOfBat)已意外停止。请重试。” 在设备屏幕上,一堆“解析失败”和“类链接失败”,然后是 logcat 中的“FATAL EXCEPTION....NoClassDefFound”。

JAR 是我在 Eclipse 上编写的普通 Java。

是的,这与许多其他人遇到的问题相同。

我尝试了那个流行的解决方案(http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17)。我将我的 JAR 放在 libs 文件夹中。没运气。

我还尝试了变体解决方案:将 JAR 称为外部 JAR 并设置“订购和导出”复选框。仍然没有运气。

我什至反编译了 APK(使用 apktool)来查看类是否被正确打包。他们是。

更多信息 Android SDK 工具 R21.0.1 Android SDK 平台工具 R16.0.1 目标 API 8 Eclipse SDK 版本:3.7.2 Debian Squeeze

我受阻了。有什么线索吗?

(还不能发布图片,所以这里是文本形式的 logcat 转储的最后一点)

11-30 21:30:44.140: W/dalvikvm(926): Link of class 'Lorg/fleen/core/diamondGrammar/Bubble;' failed

11-30 21:30:44.140: W/dalvikvm(926): Unable to match class for part: 'Lorg/fleen/core/diamondGrammar/Bubble;)Ljava/util/List;'

11-30 21:30:44.140: I/dalvikvm(926): Failed resolving Lorg/fleen/core/diamondGrammar/DNode; interface 667 'Ljavax/swing/tree/TreeNode;'

11-30 21:30:44.140: W/dalvikvm(926): Link of class 'Lorg/fleen/core/diamondGrammar/DNode;' failed

11-30 21:30:44.140: I/dalvikvm(926): Failed resolving Lorg/fleen/core/diamondGrammar/Bubble; interface 678 'Lorg/fleen/core/diamondGrammar/DNode;'

11-30 21:30:44.140: W/dalvikvm(926): Link of class 'Lorg/fleen/core/diamondGrammar/Bubble;' failed

11-30 21:30:44.150: W/dalvikvm(926): Unable to match class for part: 'Lorg/fleen/core/diamondGrammar/Bubble;)Ljava/util/List;'

11-30 21:30:44.150: I/dalvikvm(926): Failed resolving Lorg/fleen/core/diamondGrammar/DNode; interface 667 'Ljavax/swing/tree/TreeNode;'

11-30 21:30:44.150: W/dalvikvm(926): Link of class 'Lorg/fleen/core/diamondGrammar/DNode;' failed

11-30 21:30:44.150: I/dalvikvm(926): Failed resolving Lorg/fleen/core/diamondGrammar/Bubble; interface 678 'Lorg/fleen/core/diamondGrammar/DNode;'

11-30 21:30:44.150: W/dalvikvm(926): Link of class 'Lorg/fleen/core/diamondGrammar/Bubble;' failed

11-30 21:30:44.150: W/dalvikvm(926): Unable to match class for part: 'Lorg/fleen/core/diamondGrammar/Bubble;)Ljava/util/List;'

11-30 21:30:44.150: I/dalvikvm(926): Failed resolving Lorg/fleen/core/diamondGrammar/DNode; interface 667 'Ljavax/swing/tree/TreeNode;'

11-30 21:30:44.150: W/dalvikvm(926): Link of class 'Lorg/fleen/core/diamondGrammar/DNode;' failed

11-30 21:30:44.150: I/dalvikvm(926): Failed resolving Lorg/fleen/core/diamondGrammar/Bubble; interface 678 'Lorg/fleen/core/diamondGrammar/DNode;'

11-30 21:30:44.150: W/dalvikvm(926): Link of class 'Lorg/fleen/core/diamondGrammar/Bubble;' failed

11-30 21:30:44.190: W/dalvikvm(926): Unable to match class for part: 'Lorg/fleen/core/diamondGrammar/Bubble;)Ljava/util/List;'

11-30 21:30:44.190: I/dalvikvm(926): Failed resolving Lorg/fleen/core/diamondGrammar/DNode; interface 667 'Ljavax/swing/tree/TreeNode;'

11-30 21:30:44.190: W/dalvikvm(926): Link of class 'Lorg/fleen/core/diamondGrammar/DNode;' failed

11-30 21:30:44.190: I/dalvikvm(926): Failed resolving Lorg/fleen/core/diamondGrammar/Bubble; interface 678 'Lorg/fleen/core/diamondGrammar/DNode;'

11-30 21:30:44.190: W/dalvikvm(926): Link of class 'Lorg/fleen/core/diamondGrammar/Bubble;' failed

11-30 21:30:44.190: W/dalvikvm(926): Unable to match class for part: 'Lorg/fleen/core/diamondGrammar/Bubble;)Ljava/util/List;'

11-30 21:30:44.240: D/dalvikvm(926): GC_CONCURRENT freed 634K, 53% free 2792K/5831K, external 716K/1038K, paused 2ms+4ms

11-30 21:30:44.560: D/dalvikvm(926): GC_CONCURRENT freed 368K, 51% free 2874K/5831K, external 716K/1038K, paused 2ms+2ms

11-30 21:30:44.660: W/dalvikvm(926): threadid=9: thread exiting with uncaught exception (group=0x40082560)

11-30 21:30:44.660: E/AndroidRuntime(926): FATAL EXCEPTION: Thread-10

11-30 21:30:44.660: E/AndroidRuntime(926): java.lang.NoClassDefFoundError: org.fleen.core.diamondGrammar.Grid

11-30 21:30:44.660: E/AndroidRuntime(926):  at com.fleenlab.LWPA_EarOfBat.LoopingTunnelFlowVFrameBlock_TF0000_Tight.initRootAndCore(LoopingTunnelFlowVFrameBlock_TF0000_Tight.java:90)

11-30 21:30:44.660: E/AndroidRuntime(926):  at org.fleen.loopingTunnelFlowVFrameSequence.LoopingTunnelFlowVFrameBlock_Abstract.<init>(LoopingTunnelFlowVFrameBlock_Abstract.java:100)

11-30 21:30:44.660: E/AndroidRuntime(926):  at com.fleenlab.LWPA_EarOfBat.LoopingTunnelFlowVFrameBlock_TF0000_Tight.<init>(LoopingTunnelFlowVFrameBlock_TF0000_Tight.java:43)

11-30 21:30:44.660: E/AndroidRuntime(926):  at com.fleenlab.LWPA_EarOfBat.LoopingTunnelFlowVFrameSeq_Tight.getBlock(LoopingTunnelFlowVFrameSeq_Tight.java:17)

11-30 21:30:44.660: E/AndroidRuntime(926):  at com.fleenlab.LWPA_EarOfBat.LoopingTunnelFlowVFrameSeq_Tight.<init>(LoopingTunnelFlowVFrameSeq_Tight.java:14)

11-30 21:30:44.660: E/AndroidRuntime(926):  at com.fleenlab.LWPA_EarOfBat.Generator.getSeq(Generator.java:110)

11-30 21:30:44.660: E/AndroidRuntime(926):  at com.fleenlab.LWPA_EarOfBat.Generator$Initializer.run(Generator.java:78)
4

1 回答 1

0

这是一个依赖关系。Grid 依赖于 TreeNode,它在 Swing 中,而不在 JAR 中。我的解决方案是摆脱 TreeNode。反正也不是很需要。现在工作正常。

我知道 logcat 说 NoClassDefFound 发生在 Grid 中,但问题实际上并不是缺少 Grid 类定义,而是 Grid 所指的类缺少定义。

于 2013-02-04T01:59:35.183 回答