AnsweredAssumed Answered

ClassNotFoundException in an android app.

Question asked by Andy on Jun 15, 2016
Latest reply on Oct 25, 2016 by Centerback

I am getting a ClassNotFoundException in an android app.

 

here is the result:

Process: com.nedtech.kipapp, PID: 21373

                                                                    java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/naming/directory/InitialDirContext;

                                                                        at org.jivesoftware.smack.util.dns.javax.JavaxResolver.<clinit>(JavaxResolver.java :50)

                                                                        at java.lang.Class.classForName(Native Method)

                                                                        at java.lang.Class.forName(Class.java:317)

                                                                        at org.jivesoftware.smack.SmackInitialization.loadSmackClass(SmackInitialization.j ava:213)

                                                                        at org.jivesoftware.smack.SmackInitialization.parseClassesToLoad(SmackInitializati on.java:193)

                                                                        at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitializatio n.java:163)

                                                                        at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitializatio n.java:148)

                                                                        at org.jivesoftware.smack.SmackInitialization.<clinit>(SmackInitialization.java:11 6)

                                                                        at org.jivesoftware.smack.SmackConfiguration.getVersion(SmackConfiguration.java:96 )

                                                                        at org.jivesoftware.smack.ConnectionConfiguration.<clinit>(ConnectionConfiguration .java:38)

                                                                        at com.nedtech.kipapp.LoginActivity$1.onClick(LoginActivity.java:47)

                                                                        at android.view.View.performClick(View.java:4909)

                                                                        at android.view.View$PerformClick.run(View.java:20390)

                                                                        at android.os.Handler.handleCallback(Handler.java:815)

                                                                        at android.os.Handler.dispatchMessage(Handler.java:104)

                                                                        at android.os.Looper.loop(Looper.java:194)

                                                                        at android.app.ActivityThread.main(ActivityThread.java:5796)

                                                                        at java.lang.reflect.Method.invoke(Native Method)

                                                                        at java.lang.reflect.Method.invoke(Method.java:372)

                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1010 )

                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)

Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.naming.directory.InitialDirContext" on path: DexPathList[[dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-xpp3_xpath-1.1.4c_60 746da3324092e98fd5c19ba0f2785b1e29ab8e-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-support-annotations- 23.2.1_1c878c64e3f8fc576393fb136e8c732b9b1e75a1-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-tcp-4.1.7_0a90 65e511ccca14933db4abe839330d38d2f258-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-sasl-provided- 4.1.7_e5ad85c888aac120b42f7131b5431ed0bcbce269-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-sasl-javax-4.1 .7_87d5c84ed8a5014f5a2749048b6585d62e190f01-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-resolver-minid ns-4.1.7_f9466b63ae75c7dc0b3f4c2046654cb77b39b3f8-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-resolver-javax -4.1.7_3d32f51ea53ee061234f8bc0a79ea95739920dff-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-resolver-dnsja va-4.1.7_f74b9de15ac335c66a27dca28ff2114e15f8a9a6-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-legacy-4.1.7_9 2668d6dee709d09a045b1b84278a3695477a727-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-jingle-old-4.1 .7_8046defbbca4c980951fab1a44cefe00264a3126-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-java7-4.1.7_5f 8b86e2c1302ba06bab0d31e164aef28d768afc-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-im-4.1.7_a1945 9c86ed43439687b94300817123fe9546bae-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-extensions-4.1 .7_084f49e8d839d06ea8e5a7c47e810fdbb21d13e4-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-experimental-4 .1.7_8a386f5b5df256779c487d44d1007fa01af453ec-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-core-4.1.7_8ba c073b55a9011d2b8ba396cd4e0cf160683769-classes.dex", dex file "/data/data/com.nedtech.kipapp/files/instant-run/dex/slice-smack-bosh-4.1.7_035 05bdaf9cb7c8fb9e92541e2635a9935b

06-15 19:46:25.007 21373-21373/com.nedtech.kipapp I/Process: Sending signal. PID: 21373 SIG: 9

Outcomes