我正在尝试构建一个在两个启用wifi的android设备之间建立P2P连接的应用程序。我已经将JXTA 2.5库添加到android 2.2中,但是不知道我要去哪里。以运行时异常结束:未找到类错误和未发现实例错误。

除了将.jar文件包含到android项目之外,还有其他事情要做吗?
有什么配置要写吗?如果是,请告诉我如何编写配置文件并将其用于我的项目中?我正在做最后一年的项目,所以如果您对此有任何指示,请告诉我?

提前致谢 !

这是日志:

04-24 22:41:47.429: I/dalvikvm(556): Could not find method org.apache.log4j.Logger.getLogger, referenced from method net.jxta.peergroup.PeerGroupFactory.<clinit>
04-24 22:41:47.429: W/dalvikvm(556): VFY: unable to resolve static method 8971: Lorg/apache/log4j/Logger;.getLogger (Ljava/lang/String;)Lorg/apache/log4j/Logger;
04-24 22:41:47.441: D/dalvikvm(556): VFY: replacing opcode 0x77 at 0x0010
04-24 22:41:47.461: W/dalvikvm(556): VFY: unable to resolve static field 4047 (ERROR) in Lorg/apache/log4j/Level;
04-24 22:41:47.461: D/dalvikvm(556): VFY: replacing opcode 0x62 at 0x0012
04-24 22:41:47.461: W/dalvikvm(556): VFY: unable to resolve static field 4050 (WARN) in Lorg/apache/log4j/Level;
04-24 22:41:47.461: D/dalvikvm(556): VFY: replacing opcode 0x62 at 0x000c
04-24 22:41:47.469: W/dalvikvm(556): VFY: unable to resolve static field 4048 (FATAL) in Lorg/apache/log4j/Level;
04-24 22:41:47.469: D/dalvikvm(556): VFY: replacing opcode 0x62 at 0x001a
04-24 22:41:47.469: W/dalvikvm(556): VFY: unable to resolve static field 4048 (FATAL) in Lorg/apache/log4j/Level;
04-24 22:41:47.480: D/dalvikvm(556): VFY: replacing opcode 0x62 at 0x0045

最佳答案

JXTA 2.5有问题。把它忘了吧。我领导版本2.6和2.7。我们已经纠正了许多问题。我已经出版了一本名为《实用JXTA II》的书,您可以在scribd在线阅读。它包含示例。

除非您仅使用临时连接(广播),否则您可能需要一个中央超级对等方。

10-05 19:51