我有一个 Android 应用程序,它依赖于定义为 Eclipse 项目的非 Android 特定的纯 Java 库。我已使用 Build Path/Projects 选项卡将其添加为依赖项,并在 Build Path/Order 和 Export 上对其进行了检查。但是当我尝试运行该项目时,我得到如下 logcat 错误:
03-02 11:05:58.615: W/dalvikvm(2292): Link of class 'Lnet/meridiandigital/polltest/MainActivity$5;' failed
03-02 11:05:58.615: E/dalvikvm(2292): Could not find class 'net.meridiandigital.polltest.MainActivity$5', referenced from method net.meridiandigital.polltest.MainActivity.<init>
03-02 11:05:58.615: W/dalvikvm(2292): VFY: unable to resolve new-instance 575 (Lnet/meridiandigital/polltest/MainActivity$5;) in Lnet/meridiandigital/polltest/MainActivity;
03-02 11:05:58.615: W/dalvikvm(2292): VFY: unable to resolve virtual method 3316: Limap/IMAPConnection;.noop ()V
03-02 11:05:58.615: W/dalvikvm(2292): VFY: unable to resolve exception class 471 (Limap/IMAPException;)
03-02 11:05:58.615: W/dalvikvm(2292): VFY: unable to find exception handler at addr 0x26
03-02 11:05:58.615: W/dalvikvm(2292): VFY: rejected Lnet/meridiandigital/polltest/MainActivity;.alarm ()V
03-02 11:05:58.615: W/dalvikvm(2292): VFY: rejecting opcode 0x0d at 0x0026
03-02 11:05:58.615: W/dalvikvm(2292): VFY: rejected Lnet/meridiandigital/polltest/MainActivity;.alarm ()V
03-02 11:05:58.615: W/dalvikvm(2292): Verifier rejected class Lnet/meridiandigital/polltest/MainActivity;
03-02 11:05:58.625: W/dalvikvm(2292): Class init failed in newInstance call (Lnet/meridiandigital/polltest/MainActivity;)
依赖项目包含所有imap/
类的定义,并且$5
是该库中定义的接口的实现,因此它肯定是罪魁祸首。
任何想法为什么我的项目没有被链接?