Android:使用Unboundid LDAP SDK时出现运行时错误

时间:2012-11-20 14:13:57

标签: android ldap unboundid-ldap-sdk

我下载了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)

1 个答案:

答案 0 :(得分:0)

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

在项目属性中,转到Java Build Path>订单和导出:填写与LDAP sdk相对应的复选框