0

我下载了 UnboundID LDAP SDK 并将其导入到我的 Eclipse Android 项目中。它利用 SDK 提供的现有 LDAPClient。

构建成功。但是,当我尝试启动应用程序时,它会给出以下运行时错误并且应用程序不会启动。

我是 Android 和 Eclipse 的新手。因此,任何帮助或提示将不胜感激。

如果需要任何详细信息,请告诉我。我可以添加它。

11-20 19:36:38.395: I/dalvikvm(636): Could not find method com.unboundid.ldap.sdk.Filter.create, referenced from method people.finder.PeopleFinder.goSearch
11-20 19:36:38.395: W/dalvikvm(636): VFY: unable to resolve static method 3247: Lcom/unboundid/ldap/sdk/Filter;.create (Ljava/lang/String;)Lcom/unboundid/ldap/sdk/Filter;
11-20 19:36:38.395: D/dalvikvm(636): VFY: replacing opcode 0x71 at 0x00d4
11-20 19:36:38.395: W/dalvikvm(636): VFY: unable to resolve exception class 451 (Lcom/unboundid/ldap/sdk/LDAPException;)
11-20 19:36:38.395: W/dalvikvm(636): VFY: unable to find exception handler at addr 0x113
11-20 19:36:38.405: W/dalvikvm(636): VFY:  rejected people/finder/PeopleFinder;.goSearch (Landroid/view/View;)V
11-20 19:36:38.405: W/dalvikvm(636): VFY:  rejecting opcode 0x0d at 0x0113
11-20 19:36:38.405: W/dalvikvm(636): VFY:  rejected /people/finder/PeopleFinder;.goSearch (Landroid/view/View;)V
11-20 19:36:38.405: W/dalvikvm(636): Verifier rejected class people/finder/PeopleFinder;
11-20 19:36:38.405: W/dalvikvm(636): Class init failed in newInstance call (people/finder/PeopleFinder;)
11-20 19:36:38.405: D/AndroidRuntime(636): Shutting down VM
11-20 19:36:38.405: W/dalvikvm(636): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
11-20 19:36:38.415: E/AndroidRuntime(636): FATAL EXCEPTION: main
11-20 19:36:38.415: E/AndroidRuntime(636): java.lang.VerifyError: people/finder/PeopleFinder
11-20 19:36:38.415: E/AndroidRuntime(636):  at java.lang.Class.newInstanceImpl(Native Method)
11-20 19:36:38.415: E/AndroidRuntime(636):  at java.lang.Class.newInstance(Class.java:1319)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.app.ActivityThread.access$600(ActivityThread.java:130)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.os.Handler.dispatchMessage(Handler.java:99)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.os.Looper.loop(Looper.java:137)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.app.ActivityThread.main(ActivityThread.java:4745)
11-20 19:36:38.415: E/AndroidRuntime(636):  at java.lang.reflect.Method.invokeNative(Native Method)
11-20 19:36:38.415: E/AndroidRuntime(636):  at java.lang.reflect.Method.invoke(Method.java:511)
11-20 19:36:38.415: E/AndroidRuntime(636):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
11-20 19:36:38.415: E/AndroidRuntime(636):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
11-20 19:36:38.415: E/AndroidRuntime(636):  at dalvik.system.NativeStart.main(Native Method)
4

1 回答 1

0

您需要确保在构建 .apk 文件时导出 jar。

在项目属性中,转到 Java Build Path > Order and Export :填写与 LDAP sdk 对应的复选框

于 2012-11-20T14:20:14.780 回答